Feature: support customizing bind-address when allow-lan is true (#255)
This commit is contained in:
@ -46,6 +46,7 @@ func GetGeneral() *config.General {
|
||||
RedirPort: ports.RedirPort,
|
||||
Authentication: authenticator,
|
||||
AllowLan: P.AllowLan(),
|
||||
BindAddress: P.BindAddress(),
|
||||
Mode: T.Instance().Mode(),
|
||||
LogLevel: log.Level(),
|
||||
}
|
||||
@ -105,6 +106,9 @@ func updateGeneral(general *config.General) {
|
||||
allowLan := general.AllowLan
|
||||
P.SetAllowLan(allowLan)
|
||||
|
||||
bindAddress := general.BindAddress
|
||||
P.SetBindAddress(bindAddress)
|
||||
|
||||
if err := P.ReCreateHTTP(general.Port); err != nil {
|
||||
log.Errorln("Start HTTP server error: %s", err.Error())
|
||||
}
|
||||
|
Reference in New Issue
Block a user