mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-27 01:07:10 +00:00
feat: Add LAN allowed and disallowed IP configurations (#861)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user