diff --git a/v2rayN/ServiceLib/Handler/ConfigHandler.cs b/v2rayN/ServiceLib/Handler/ConfigHandler.cs index bc4914b7..5e5e30b5 100644 --- a/v2rayN/ServiceLib/Handler/ConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConfigHandler.cs @@ -1494,8 +1494,7 @@ public static class ConfigHandler public static ProfileItem? GetPreSocksItem(Config config, ProfileItem node, ECoreType coreType) { ProfileItem? itemSocks = null; - var enableLegacyProtect = config.TunModeItem.EnableLegacyProtect - || Utils.IsNonWindows(); + var enableLegacyProtect = config.TunModeItem.EnableLegacyProtect; if (node.ConfigType != EConfigType.Custom && coreType != ECoreType.sing_box && config.TunModeItem.EnableTun diff --git a/v2rayN/ServiceLib/Manager/CoreManager.cs b/v2rayN/ServiceLib/Manager/CoreManager.cs index 41d2343b..84ff7f38 100644 --- a/v2rayN/ServiceLib/Manager/CoreManager.cs +++ b/v2rayN/ServiceLib/Manager/CoreManager.cs @@ -230,7 +230,7 @@ public class CoreManager { if (mayNeedSudo && _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()) { _linuxSudo = true;