mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-28 11:02:51 +00:00
Avoids detour for private networks
This commit is contained in:
parent
7f6399933a
commit
aba816425d
2 changed files with 2 additions and 2 deletions
|
|
@ -2006,7 +2006,7 @@ public class CoreConfigSingboxService
|
|||
continue;
|
||||
}
|
||||
}
|
||||
else if (outbound.detour.IsNullOrEmpty() && (!customConfig.ProxyDetour.IsNullOrEmpty()))
|
||||
else if (outbound.detour.IsNullOrEmpty() && (!customConfig.ProxyDetour.IsNullOrEmpty()) && !Utils.IsPrivateNetwork(outbound.server ?? string.Empty))
|
||||
{
|
||||
outbound.detour = customConfig.ProxyDetour;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1642,7 +1642,7 @@ public class CoreConfigV2rayService
|
|||
continue;
|
||||
}
|
||||
}
|
||||
else if ((outbound.streamSettings?.sockopt?.dialerProxy.IsNullOrEmpty() == true) && (!customConfig.ProxyDetour.IsNullOrEmpty()))
|
||||
else if ((outbound.streamSettings?.sockopt?.dialerProxy.IsNullOrEmpty() == true) && (!customConfig.ProxyDetour.IsNullOrEmpty()) && !(Utils.IsPrivateNetwork(outbound.settings?.servers?.FirstOrDefault()?.address ?? string.Empty) || Utils.IsPrivateNetwork(outbound.settings?.vnext?.FirstOrDefault()?.address ?? string.Empty)))
|
||||
{
|
||||
outbound.streamSettings ??= new StreamSettings4Ray();
|
||||
outbound.streamSettings.sockopt ??= new Sockopt4Ray();
|
||||
|
|
|
|||
Loading…
Reference in a new issue