mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 12:35:46 +00:00
Don't generate TUN config for sing-box on Linux
This commit is contained in:
parent
d5267d0b69
commit
1d653535ba
4 changed files with 4 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ public partial class CoreConfigSingboxService
|
||||||
return JsonUtils.Serialize(_coreConfig);
|
return JsonUtils.Serialize(_coreConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
var fullConfigTemplateItem = context.IsTunEnabled ? fullConfigTemplate.TunConfig : fullConfigTemplate.Config;
|
var fullConfigTemplateItem = (context.IsTunEnabled && !Utils.IsLinux()) ? fullConfigTemplate.TunConfig : fullConfigTemplate.Config;
|
||||||
if (fullConfigTemplateItem.IsNullOrEmpty())
|
if (fullConfigTemplateItem.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
return JsonUtils.Serialize(_coreConfig);
|
return JsonUtils.Serialize(_coreConfig);
|
||||||
|
|
|
||||||
|
|
@ -414,7 +414,7 @@ public partial class CoreConfigSingboxService
|
||||||
{
|
{
|
||||||
var item = context.RawDnsItem;
|
var item = context.RawDnsItem;
|
||||||
var strDNS = string.Empty;
|
var strDNS = string.Empty;
|
||||||
if (context.IsTunEnabled)
|
if (context.IsTunEnabled && !Utils.IsLinux())
|
||||||
{
|
{
|
||||||
strDNS = string.IsNullOrEmpty(item?.TunDNS) ? EmbedUtils.GetEmbedText(Global.TunSingboxDNSFileName) : item?.TunDNS;
|
strDNS = string.IsNullOrEmpty(item?.TunDNS) ? EmbedUtils.GetEmbedText(Global.TunSingboxDNSFileName) : item?.TunDNS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public partial class CoreConfigSingboxService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context.IsTunEnabled)
|
if (context.IsTunEnabled && !Utils.IsLinux())
|
||||||
{
|
{
|
||||||
if (_config.TunModeItem.Mtu <= 0)
|
if (_config.TunModeItem.Mtu <= 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public partial class CoreConfigSingboxService
|
||||||
strategy = directDnsStrategy
|
strategy = directDnsStrategy
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_config.TunModeItem.EnableTun)
|
if (_config.TunModeItem.EnableTun && !Utils.IsLinux())
|
||||||
{
|
{
|
||||||
_coreConfig.route.auto_detect_interface = true;
|
_coreConfig.route.auto_detect_interface = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue