mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-26 20:29:03 +03:00
Handle TUN loopback in direct outbound
This commit is contained in:
@@ -40,11 +40,11 @@ func NewNetworkInterfaceAddressItem(networkManager adapter.NetworkManager, inter
|
||||
|
||||
func (r *NetworkInterfaceAddressItem) Match(metadata *adapter.InboundContext) bool {
|
||||
interfaces := r.networkManager.NetworkInterfaces()
|
||||
myInterface := r.networkManager.InterfaceMonitor().MyInterface()
|
||||
myInterfaces := r.networkManager.InterfaceMonitor().MyInterfaces()
|
||||
match:
|
||||
for ifType, addresses := range r.interfaceAddresses {
|
||||
for _, networkInterface := range interfaces {
|
||||
if networkInterface.Name == myInterface {
|
||||
if common.Contains(myInterfaces, networkInterface.Name) {
|
||||
continue
|
||||
}
|
||||
if networkInterface.Type != ifType {
|
||||
|
||||
Reference in New Issue
Block a user