mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-27 10:40:08 +00:00
Compare commits
No commits in common. "cb182125f6d2a7e431de3867a8de1be7dde2cffb" and "a87a015c03f86e28c60b4ba008db15de4c708400" have entirely different histories.
cb182125f6
...
a87a015c03
4 changed files with 15 additions and 34 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>7.14.10</Version>
|
||||
<Version>7.14.9</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.6" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.6" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.6" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.3.6" />
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.5" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.5" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.5" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.3.5" />
|
||||
<PackageVersion Include="CliWrap" Version="3.9.0" />
|
||||
<PackageVersion Include="Downloader" Version="4.0.3" />
|
||||
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.3.0" />
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@ public partial class CoreConfigSingboxService
|
|||
}
|
||||
|
||||
var hostsDomains = new List<string>();
|
||||
var systemHostsMap = Utils.GetSystemHosts();
|
||||
foreach (var kvp in systemHostsMap)
|
||||
{
|
||||
hostsDomains.Add(kvp.Key);
|
||||
}
|
||||
var dnsItem = await AppManager.Instance.GetDNSItem(ECoreType.sing_box);
|
||||
if (dnsItem == null || dnsItem.Enabled == false)
|
||||
{
|
||||
|
|
@ -84,23 +89,12 @@ public partial class CoreConfigSingboxService
|
|||
hostsDomains.Add(kvp.Key);
|
||||
}
|
||||
}
|
||||
if (simpleDNSItem.UseSystemHosts == true)
|
||||
{
|
||||
var systemHostsMap = Utils.GetSystemHosts();
|
||||
foreach (var kvp in systemHostsMap)
|
||||
{
|
||||
hostsDomains.Add(kvp.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hostsDomains.Count > 0)
|
||||
{
|
||||
singboxConfig.route.rules.Add(new()
|
||||
{
|
||||
action = "resolve",
|
||||
domain = hostsDomains,
|
||||
});
|
||||
}
|
||||
|
||||
singboxConfig.route.rules.Add(new()
|
||||
{
|
||||
|
|
@ -374,13 +368,6 @@ public partial class CoreConfigSingboxService
|
|||
return Global.ProxyTag;
|
||||
}
|
||||
|
||||
var tag = Global.ProxyTag + node.IndexId.ToString();
|
||||
if (singboxConfig.outbounds.Any(o => o.tag == tag)
|
||||
|| (singboxConfig.endpoints != null && singboxConfig.endpoints.Any(e => e.tag == tag)))
|
||||
{
|
||||
return tag;
|
||||
}
|
||||
|
||||
var server = await GenServer(node);
|
||||
if (server is null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -131,16 +131,10 @@ public partial class CoreConfigV2rayService
|
|||
return Global.ProxyTag;
|
||||
}
|
||||
|
||||
var tag = Global.ProxyTag + node.IndexId.ToString();
|
||||
if (v2rayConfig.outbounds.Any(p => p.tag == tag))
|
||||
{
|
||||
return tag;
|
||||
}
|
||||
|
||||
var txtOutbound = EmbedUtils.GetEmbedText(Global.V2raySampleOutbound);
|
||||
var outbound = JsonUtils.Deserialize<Outbounds4Ray>(txtOutbound);
|
||||
await GenOutbound(node, outbound);
|
||||
outbound.tag = tag;
|
||||
outbound.tag = Global.ProxyTag + node.IndexId.ToString();
|
||||
v2rayConfig.outbounds.Add(outbound);
|
||||
|
||||
return outbound.tag;
|
||||
|
|
|
|||
Loading…
Reference in a new issue