Code maintenance: HTTP proxy loop reworked
- Blocking method calls on loop - Restart proxy when settings change - Detect server crash error and restart it
This commit is contained in:
@@ -271,7 +271,7 @@ func _main(background context.Context, buildInfo models.BuildInformation,
|
||||
go shadowsocksLooper.Run(ctx, wg)
|
||||
|
||||
if allSettings.HTTPProxy.Enabled {
|
||||
httpProxyLooper.Restart()
|
||||
_, _ = httpProxyLooper.SetStatus(constants.Running)
|
||||
}
|
||||
if allSettings.ShadowSocks.Enabled {
|
||||
restartShadowsocks()
|
||||
|
||||
Reference in New Issue
Block a user