mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-16 10:14:59 +03:00
xray tun for linux and macos (#9632)
This commit is contained in:
@@ -1494,8 +1494,7 @@ public static class ConfigHandler
|
|||||||
public static ProfileItem? GetPreSocksItem(Config config, ProfileItem node, ECoreType coreType)
|
public static ProfileItem? GetPreSocksItem(Config config, ProfileItem node, ECoreType coreType)
|
||||||
{
|
{
|
||||||
ProfileItem? itemSocks = null;
|
ProfileItem? itemSocks = null;
|
||||||
var enableLegacyProtect = config.TunModeItem.EnableLegacyProtect
|
var enableLegacyProtect = config.TunModeItem.EnableLegacyProtect;
|
||||||
|| Utils.IsNonWindows();
|
|
||||||
if (node.ConfigType != EConfigType.Custom
|
if (node.ConfigType != EConfigType.Custom
|
||||||
&& coreType != ECoreType.sing_box
|
&& coreType != ECoreType.sing_box
|
||||||
&& config.TunModeItem.EnableTun
|
&& config.TunModeItem.EnableTun
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ public class CoreManager
|
|||||||
{
|
{
|
||||||
if (mayNeedSudo
|
if (mayNeedSudo
|
||||||
&& _config.TunModeItem.EnableTun
|
&& _config.TunModeItem.EnableTun
|
||||||
&& (coreInfo.CoreType is ECoreType.sing_box or ECoreType.mihomo)
|
&& (coreInfo.CoreType is ECoreType.sing_box or ECoreType.mihomo or ECoreType.Xray)
|
||||||
&& Utils.IsNonWindows())
|
&& Utils.IsNonWindows())
|
||||||
{
|
{
|
||||||
_linuxSudo = true;
|
_linuxSudo = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user