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

@@ -26,6 +26,7 @@ type Settings struct {
PublicIPPeriod time.Duration
UpdaterPeriod time.Duration
VersionInformation bool
ControlServer ControlServer
}
func (s *Settings) String() string {
@@ -45,6 +46,7 @@ func (s *Settings) String() string {
s.Firewall.String(),
s.TinyProxy.String(),
s.ShadowSocks.String(),
s.ControlServer.String(),
"Public IP check period: " + s.PublicIPPeriod.String(), // TODO print disabled if 0
"Version information: " + versionInformation,
updaterLine,
@@ -95,5 +97,9 @@ func GetAllSettings(paramsReader params.Reader) (settings Settings, err error) {
if err != nil {
return settings, err
}
settings.ControlServer, err = GetControlServerSettings(paramsReader)
if err != nil {
return settings, err
}
return settings, nil
}