xray tun for linux and macos (#9632)

This commit is contained in:
DHR60
2026-06-26 01:04:44 +00:00
committed by GitHub
parent c97dc1d894
commit 8d94997ba0
2 changed files with 2 additions and 3 deletions

View File

@@ -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

View File

@@ -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;