feat: Add LAN allowed and disallowed IP configurations (#861)

This commit is contained in:
Kuingsmile
2023-12-12 04:39:11 -08:00
committed by wwqgtxx
parent 3cf865e5f0
commit 7ee6809257
8 changed files with 103 additions and 3 deletions

View File

@@ -141,6 +141,8 @@ func GetGeneral() *config.General {
VmessConfig: ports.VmessConfig,
Authentication: authenticator,
SkipAuthPrefixes: inbound.SkipAuthPrefixes(),
LanAllowedIPs: inbound.AllowedIPs(),
LanDisAllowedIPs: inbound.DisAllowedIPs(),
AllowLan: listener.AllowLan(),
BindAddress: listener.BindAddress(),
},
@@ -166,6 +168,8 @@ func updateListeners(general *config.General, listeners map[string]C.InboundList
allowLan := general.AllowLan
listener.SetAllowLan(allowLan)
inbound.SetSkipAuthPrefixes(general.SkipAuthPrefixes)
inbound.SetAllowedIPs(general.LanAllowedIPs)
inbound.SetDisAllowedIPs(general.LanDisAllowedIPs)
bindAddress := general.BindAddress
listener.SetBindAddress(bindAddress)