Skip to content

Commit

Permalink
Fix: run remoteServerListFetchers in proxy-only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rod-hynes committed Oct 2, 2024
1 parent 2677413 commit 51a550f
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions psiphon/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 51a550f

Please sign in to comment.