Fix #261 add variable HTTP_CONTROL_SERVER_PORT

This commit is contained in:
Quentin McGaw
2020-10-17 22:07:15 +00:00
parent 6f4be72785
commit 8abc22977c
6 changed files with 60 additions and 2 deletions

View File

@@ -236,8 +236,8 @@ func _main(background context.Context, args []string) int { //nolint:gocognit,go
unboundLooper, updaterLooper, publicIPLooper, routingConf, logger, httpClient,
allSettings.VersionInformation, allSettings.OpenVPN.Provider.PortForwarding.Enabled, openvpnLooper.PortForward,
)
httpServer := server.New("0.0.0.0:8000", logger, openvpnLooper, unboundLooper, updaterLooper)
controlServerAddress := fmt.Sprintf("0.0.0.0:%d", allSettings.ControlServer.Port)
httpServer := server.New(controlServerAddress, logger, openvpnLooper, unboundLooper, updaterLooper)
wg.Add(1)
go httpServer.Run(ctx, wg)