mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-01-04 00:23:43 +08:00
fix: lan-allowed-ips
does not take effect
This commit is contained in:
parent
822ba5f0b5
commit
20658f6eac
@ -71,8 +71,8 @@ func NewWithAuthenticate(addr string, tunnel C.Tunnel, authenticate bool, additi
|
||||
t.SetKeepAlive(false)
|
||||
}
|
||||
}
|
||||
if len(additions) == 0 { // only apply on default listener
|
||||
if inbound.IsRemoteAddrDisAllowed(conn.RemoteAddr()) {
|
||||
if len(additions) == 2 { // only apply on default listener
|
||||
if !inbound.IsRemoteAddrDisAllowed(conn.RemoteAddr()) {
|
||||
_ = conn.Close()
|
||||
continue
|
||||
}
|
||||
|
@ -62,8 +62,8 @@ func New(addr string, tunnel C.Tunnel, additions ...inbound.Addition) (*Listener
|
||||
}
|
||||
continue
|
||||
}
|
||||
if len(additions) == 0 { // only apply on default listener
|
||||
if inbound.IsRemoteAddrDisAllowed(c.RemoteAddr()) {
|
||||
if len(additions) == 2 { // only apply on default listener
|
||||
if !inbound.IsRemoteAddrDisAllowed(c.RemoteAddr()) {
|
||||
_ = c.Close()
|
||||
continue
|
||||
}
|
||||
|
@ -59,8 +59,8 @@ func New(addr string, tunnel C.Tunnel, additions ...inbound.Addition) (*Listener
|
||||
}
|
||||
continue
|
||||
}
|
||||
if len(additions) == 0 { // only apply on default listener
|
||||
if inbound.IsRemoteAddrDisAllowed(c.RemoteAddr()) {
|
||||
if len(additions) == 2 { // only apply on default listener
|
||||
if !inbound.IsRemoteAddrDisAllowed(c.RemoteAddr()) {
|
||||
_ = c.Close()
|
||||
continue
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user