Procházet zdrojové kódy

Fix: run remoteServerListFetchers in proxy-only mode

Rod Hynes před 1 rokem
rodič
revize
51a550f322
1 změnil soubory, kde provedl 19 přidání a 19 odebrání
  1. 19 19
      psiphon/controller.go

+ 19 - 19
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()