From 51a550f32259c9fff6c1dd129eeef6d7cf8f6791 Mon Sep 17 00:00:00 2001 From: Rod Hynes Date: Wed, 2 Oct 2024 11:25:03 -0400 Subject: [PATCH] Fix: run remoteServerListFetchers in proxy-only mode --- psiphon/controller.go | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/psiphon/controller.go b/psiphon/controller.go index c2217f018..7ae150fc2 100644 --- a/psiphon/controller.go +++ b/psiphon/controller.go @@ -358,25 +358,6 @@ func (controller *Controller) Run(ctx context.Context) { defer httpProxy.Close() } - if !controller.config.DisableRemoteServerListFetcher { - - if controller.config.RemoteServerListURLs != nil { - controller.runWaitGroup.Add(1) - go controller.remoteServerListFetcher( - "common", - FetchCommonRemoteServerList, - controller.signalFetchCommonRemoteServerList) - } - - if controller.config.ObfuscatedServerListRootURLs != nil { - controller.runWaitGroup.Add(1) - go controller.remoteServerListFetcher( - "obfuscated", - FetchObfuscatedServerLists, - controller.signalFetchObfuscatedServerLists) - } - } - if controller.config.EnableUpgradeDownload { controller.runWaitGroup.Add(1) go controller.upgradeDownloader() @@ -399,6 +380,25 @@ func (controller *Controller) Run(ctx context.Context) { } } + if !controller.config.DisableRemoteServerListFetcher { + + if controller.config.RemoteServerListURLs != nil { + controller.runWaitGroup.Add(1) + go controller.remoteServerListFetcher( + "common", + FetchCommonRemoteServerList, + controller.signalFetchCommonRemoteServerList) + } + + if controller.config.ObfuscatedServerListRootURLs != nil { + controller.runWaitGroup.Add(1) + go controller.remoteServerListFetcher( + "obfuscated", + FetchObfuscatedServerLists, + controller.signalFetchObfuscatedServerLists) + } + } + if controller.config.InproxyEnableProxy { controller.runWaitGroup.Add(1) go controller.runInproxyProxy()