Remove unnecessary settings

This commit is contained in:
DHR60 2025-10-10 20:38:33 +08:00
parent 9a9e28e494
commit 137f498668
19 changed files with 133 additions and 321 deletions

View file

@ -84,8 +84,7 @@ public class Global
public const string SingboxDirectDNSTag = "direct_dns"; public const string SingboxDirectDNSTag = "direct_dns";
public const string SingboxRemoteDNSTag = "remote_dns"; public const string SingboxRemoteDNSTag = "remote_dns";
public const string SingboxOutboundResolverTag = "outbound_resolver"; public const string SingboxLocalDNSTag = "local_local";
public const string SingboxFinalResolverTag = "final_resolver";
public const string SingboxHostsDNSTag = "hosts_dns"; public const string SingboxHostsDNSTag = "hosts_dns";
public const string SingboxFakeDNSTag = "fake_dns"; public const string SingboxFakeDNSTag = "fake_dns";

View file

@ -2274,8 +2274,6 @@ public static class ConfigHandler
BlockBindingQuery = true, BlockBindingQuery = true,
DirectDNS = Global.DomainDirectDNSAddress.FirstOrDefault(), DirectDNS = Global.DomainDirectDNSAddress.FirstOrDefault(),
RemoteDNS = Global.DomainRemoteDNSAddress.FirstOrDefault(), RemoteDNS = Global.DomainRemoteDNSAddress.FirstOrDefault(),
SingboxOutboundsResolveDNS = Global.DomainDirectDNSAddress.FirstOrDefault(),
SingboxFinalResolveDNS = Global.DomainPureIPDNSAddress.FirstOrDefault()
}; };
} }

View file

@ -264,8 +264,6 @@ public class SimpleDNSItem
public bool? BlockBindingQuery { get; set; } public bool? BlockBindingQuery { get; set; }
public string? DirectDNS { get; set; } public string? DirectDNS { get; set; }
public string? RemoteDNS { get; set; } public string? RemoteDNS { get; set; }
public string? SingboxOutboundsResolveDNS { get; set; }
public string? SingboxFinalResolveDNS { get; set; }
public string? RayStrategy4Freedom { get; set; } public string? RayStrategy4Freedom { get; set; }
public string? SingboxStrategy4Direct { get; set; } public string? SingboxStrategy4Direct { get; set; }
public string? SingboxStrategy4Proxy { get; set; } public string? SingboxStrategy4Proxy { get; set; }

View file

@ -2509,7 +2509,7 @@ namespace ServiceLib.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 Prevent domain-based routing rules from failing 的本地化字符串。 /// 查找类似 Block ECH and HTTP/3 availability checks when enabled 的本地化字符串。
/// </summary> /// </summary>
public static string TbBlockSVCBHTTPSQueriesTips { public static string TbBlockSVCBHTTPSQueriesTips {
get { get {
@ -2607,6 +2607,24 @@ namespace ServiceLib.Resx {
} }
} }
/// <summary>
/// 查找类似 V2ray Custom DNS 的本地化字符串。
/// </summary>
public static string TbCustomDnsRay {
get {
return ResourceManager.GetString("TbCustomDnsRay", resourceCulture);
}
}
/// <summary>
/// 查找类似 sing-box Custom DNS 的本地化字符串。
/// </summary>
public static string TbCustomDnsSingbox {
get {
return ResourceManager.GetString("TbCustomDnsSingbox", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Display GUI 的本地化字符串。 /// 查找类似 Display GUI 的本地化字符串。
/// </summary> /// </summary>
@ -3039,6 +3057,15 @@ namespace ServiceLib.Resx {
} }
} }
/// <summary>
/// 查找类似 Via proxy — please ensure remote availability 的本地化字符串。
/// </summary>
public static string TbRemoteDNSTips {
get {
return ResourceManager.GetString("TbRemoteDNSTips", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Camouflage domain(host) 的本地化字符串。 /// 查找类似 Camouflage domain(host) 的本地化字符串。
/// </summary> /// </summary>
@ -3174,15 +3201,6 @@ namespace ServiceLib.Resx {
} }
} }
/// <summary>
/// 查找类似 Bootstrap DNS (sing-box) 的本地化字符串。
/// </summary>
public static string TbSBBootstrapDNS {
get {
return ResourceManager.GetString("TbSBBootstrapDNS", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 sing-box Direct Resolution Strategy 的本地化字符串。 /// 查找类似 sing-box Direct Resolution Strategy 的本地化字符串。
/// </summary> /// </summary>
@ -3192,15 +3210,6 @@ namespace ServiceLib.Resx {
} }
} }
/// <summary>
/// 查找类似 Resolve DNS server domains, requires IP 的本地化字符串。
/// </summary>
public static string TbSBFallbackDNSResolve {
get {
return ResourceManager.GetString("TbSBFallbackDNSResolve", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 sing-box Full Config Template 的本地化字符串。 /// 查找类似 sing-box Full Config Template 的本地化字符串。
/// </summary> /// </summary>
@ -3219,24 +3228,6 @@ namespace ServiceLib.Resx {
} }
} }
/// <summary>
/// 查找类似 Resolve Outbound Domains 的本地化字符串。
/// </summary>
public static string TbSBOutboundDomainResolve {
get {
return ResourceManager.GetString("TbSBOutboundDomainResolve", resourceCulture);
}
}
/// <summary>
/// 查找类似 Outbound DNS Resolution (sing-box) 的本地化字符串。
/// </summary>
public static string TbSBOutboundsResolverDNS {
get {
return ResourceManager.GetString("TbSBOutboundsResolverDNS", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 sing-box Remote Resolution Strategy 的本地化字符串。 /// 查找类似 sing-box Remote Resolution Strategy 的本地化字符串。
/// </summary> /// </summary>
@ -3372,24 +3363,6 @@ namespace ServiceLib.Resx {
} }
} }
/// <summary>
/// 查找类似 V2ray DNS settings 的本地化字符串。
/// </summary>
public static string TbSettingsCoreDns {
get {
return ResourceManager.GetString("TbSettingsCoreDns", resourceCulture);
}
}
/// <summary>
/// 查找类似 sing-box DNS settings 的本地化字符串。
/// </summary>
public static string TbSettingsCoreDnsSingbox {
get {
return ResourceManager.GetString("TbSettingsCoreDnsSingbox", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Core: KCP settings 的本地化字符串。 /// 查找类似 Core: KCP settings 的本地化字符串。
/// </summary> /// </summary>
@ -4275,9 +4248,9 @@ namespace ServiceLib.Resx {
/// <summary> /// <summary>
/// 查找类似 xray Freedom Resolution Strategy 的本地化字符串。 /// 查找类似 xray Freedom Resolution Strategy 的本地化字符串。
/// </summary> /// </summary>
public static string TbXrayFreedomResolveStrategy { public static string TbXrayFreedomStrategy {
get { get {
return ResourceManager.GetString("TbXrayFreedomResolveStrategy", resourceCulture); return ResourceManager.GetString("TbXrayFreedomStrategy", resourceCulture);
} }
} }

View file

@ -675,8 +675,8 @@
<data name="TbSettingsCore" xml:space="preserve"> <data name="TbSettingsCore" xml:space="preserve">
<value>هسته: تنظیمات اولیه</value> <value>هسته: تنظیمات اولیه</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbCustomDnsRay" xml:space="preserve">
<value>تنظیمات V2ray DNS</value> <value>V2ray Custom DNS</value>
</data> </data>
<data name="TbSettingsCoreKcp" xml:space="preserve"> <data name="TbSettingsCoreKcp" xml:space="preserve">
<value>هسته: تنظیمات KCP</value> <value>هسته: تنظیمات KCP</value>
@ -1011,8 +1011,8 @@
<data name="menuDNSSetting" xml:space="preserve"> <data name="menuDNSSetting" xml:space="preserve">
<value>تنظیمات DNS</value> <value>تنظیمات DNS</value>
</data> </data>
<data name="TbSettingsCoreDnsSingbox" xml:space="preserve"> <data name="TbCustomDnsSingbox" xml:space="preserve">
<value>تنظیمات DNS sing-box</value> <value>sing-box Custom DNS</value>
</data> </data>
<data name="TbDnsSingboxObjectDoc" xml:space="preserve"> <data name="TbDnsSingboxObjectDoc" xml:space="preserve">
<value>لطفا ساختار DNS را پر کنید، برای مشاهده سند کلیک کنید</value> <value>لطفا ساختار DNS را پر کنید، برای مشاهده سند کلیک کنید</value>
@ -1419,19 +1419,10 @@
<data name="TbDomesticDNS" xml:space="preserve"> <data name="TbDomesticDNS" xml:space="preserve">
<value>Domestic DNS</value> <value>Domestic DNS</value>
</data> </data>
<data name="TbSBOutboundsResolverDNS" xml:space="preserve"> <data name="TbRemoteDNSTips" xml:space="preserve">
<value>Outbound DNS Resolution (sing-box)</value> <value>Via proxy — please ensure remote availability</value>
</data> </data>
<data name="TbSBOutboundDomainResolve" xml:space="preserve"> <data name="TbXrayFreedomStrategy" xml:space="preserve">
<value>Resolve Outbound Domains</value>
</data>
<data name="TbSBBootstrapDNS" xml:space="preserve">
<value>Bootstrap DNS (sing-box)</value>
</data>
<data name="TbSBFallbackDNSResolve" xml:space="preserve">
<value>Resolve DNS server domains, requires IP</value>
</data>
<data name="TbXrayFreedomResolveStrategy" xml:space="preserve">
<value>xray Freedom Resolution Strategy</value> <value>xray Freedom Resolution Strategy</value>
</data> </data>
<data name="TbSBDirectResolveStrategy" xml:space="preserve"> <data name="TbSBDirectResolveStrategy" xml:space="preserve">
@ -1471,7 +1462,7 @@
<value>Custom DNS Enabled, This Page's Settings Invalid</value> <value>Custom DNS Enabled, This Page's Settings Invalid</value>
</data> </data>
<data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve"> <data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve">
<value>Prevent domain-based routing rules from failing</value> <value>Block ECH and HTTP/3 availability checks when enabled</value>
</data> </data>
<data name="FillCorrectConfigTemplateText" xml:space="preserve"> <data name="FillCorrectConfigTemplateText" xml:space="preserve">
<value>Please fill in the correct config template</value> <value>Please fill in the correct config template</value>

View file

@ -675,8 +675,8 @@
<data name="TbSettingsCore" xml:space="preserve"> <data name="TbSettingsCore" xml:space="preserve">
<value>Core: alapbeállítások</value> <value>Core: alapbeállítások</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbCustomDnsRay" xml:space="preserve">
<value>V2ray DNS beállítások</value> <value>V2ray Custom DNS</value>
</data> </data>
<data name="TbSettingsCoreKcp" xml:space="preserve"> <data name="TbSettingsCoreKcp" xml:space="preserve">
<value>Core: KCP beállítások</value> <value>Core: KCP beállítások</value>
@ -1011,8 +1011,8 @@
<data name="menuDNSSetting" xml:space="preserve"> <data name="menuDNSSetting" xml:space="preserve">
<value>DNS beállítások</value> <value>DNS beállítások</value>
</data> </data>
<data name="TbSettingsCoreDnsSingbox" xml:space="preserve"> <data name="TbCustomDnsSingbox" xml:space="preserve">
<value>sing-box DNS beállítások</value> <value>sing-box Custom DNS</value>
</data> </data>
<data name="TbDnsSingboxObjectDoc" xml:space="preserve"> <data name="TbDnsSingboxObjectDoc" xml:space="preserve">
<value>Kérjük, töltse ki a DNS struktúrát, kattintson a dokumentum megtekintéséhez</value> <value>Kérjük, töltse ki a DNS struktúrát, kattintson a dokumentum megtekintéséhez</value>
@ -1419,19 +1419,10 @@
<data name="TbDomesticDNS" xml:space="preserve"> <data name="TbDomesticDNS" xml:space="preserve">
<value>Domestic DNS</value> <value>Domestic DNS</value>
</data> </data>
<data name="TbSBOutboundsResolverDNS" xml:space="preserve"> <data name="TbRemoteDNSTips" xml:space="preserve">
<value>Outbound DNS Resolution (sing-box)</value> <value>Via proxy — please ensure remote availability</value>
</data> </data>
<data name="TbSBOutboundDomainResolve" xml:space="preserve"> <data name="TbXrayFreedomStrategy" xml:space="preserve">
<value>Resolve Outbound Domains</value>
</data>
<data name="TbSBBootstrapDNS" xml:space="preserve">
<value>Bootstrap DNS (sing-box)</value>
</data>
<data name="TbSBFallbackDNSResolve" xml:space="preserve">
<value>Resolve DNS server domains, requires IP</value>
</data>
<data name="TbXrayFreedomResolveStrategy" xml:space="preserve">
<value>xray Freedom Resolution Strategy</value> <value>xray Freedom Resolution Strategy</value>
</data> </data>
<data name="TbSBDirectResolveStrategy" xml:space="preserve"> <data name="TbSBDirectResolveStrategy" xml:space="preserve">
@ -1471,7 +1462,7 @@
<value>Custom DNS Enabled, This Page's Settings Invalid</value> <value>Custom DNS Enabled, This Page's Settings Invalid</value>
</data> </data>
<data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve"> <data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve">
<value>Prevent domain-based routing rules from failing</value> <value>Block ECH and HTTP/3 availability checks when enabled</value>
</data> </data>
<data name="FillCorrectConfigTemplateText" xml:space="preserve"> <data name="FillCorrectConfigTemplateText" xml:space="preserve">
<value>Please fill in the correct config template</value> <value>Please fill in the correct config template</value>

View file

@ -675,8 +675,8 @@
<data name="TbSettingsCore" xml:space="preserve"> <data name="TbSettingsCore" xml:space="preserve">
<value>Core: basic settings</value> <value>Core: basic settings</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbCustomDnsRay" xml:space="preserve">
<value>V2ray DNS settings</value> <value>V2ray Custom DNS</value>
</data> </data>
<data name="TbSettingsCoreKcp" xml:space="preserve"> <data name="TbSettingsCoreKcp" xml:space="preserve">
<value>Core: KCP settings</value> <value>Core: KCP settings</value>
@ -1011,8 +1011,8 @@
<data name="menuDNSSetting" xml:space="preserve"> <data name="menuDNSSetting" xml:space="preserve">
<value>DNS Settings</value> <value>DNS Settings</value>
</data> </data>
<data name="TbSettingsCoreDnsSingbox" xml:space="preserve"> <data name="TbCustomDnsSingbox" xml:space="preserve">
<value>sing-box DNS settings</value> <value>sing-box Custom DNS</value>
</data> </data>
<data name="TbDnsSingboxObjectDoc" xml:space="preserve"> <data name="TbDnsSingboxObjectDoc" xml:space="preserve">
<value>Please fill in DNS Structure, Click to view the document</value> <value>Please fill in DNS Structure, Click to view the document</value>
@ -1419,19 +1419,10 @@
<data name="TbDomesticDNS" xml:space="preserve"> <data name="TbDomesticDNS" xml:space="preserve">
<value>Domestic DNS</value> <value>Domestic DNS</value>
</data> </data>
<data name="TbSBOutboundsResolverDNS" xml:space="preserve"> <data name="TbRemoteDNSTips" xml:space="preserve">
<value>Outbound DNS Resolution (sing-box)</value> <value>Via proxy — please ensure remote availability</value>
</data> </data>
<data name="TbSBOutboundDomainResolve" xml:space="preserve"> <data name="TbXrayFreedomStrategy" xml:space="preserve">
<value>Resolve Outbound Domains</value>
</data>
<data name="TbSBBootstrapDNS" xml:space="preserve">
<value>Bootstrap DNS (sing-box)</value>
</data>
<data name="TbSBFallbackDNSResolve" xml:space="preserve">
<value>Resolve DNS server domains, requires IP</value>
</data>
<data name="TbXrayFreedomResolveStrategy" xml:space="preserve">
<value>xray Freedom Resolution Strategy</value> <value>xray Freedom Resolution Strategy</value>
</data> </data>
<data name="TbSBDirectResolveStrategy" xml:space="preserve"> <data name="TbSBDirectResolveStrategy" xml:space="preserve">
@ -1471,7 +1462,7 @@
<value>Custom DNS Enabled, This Page's Settings Invalid</value> <value>Custom DNS Enabled, This Page's Settings Invalid</value>
</data> </data>
<data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve"> <data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve">
<value>Prevent domain-based routing rules from failing</value> <value>Block ECH and HTTP/3 availability checks when enabled</value>
</data> </data>
<data name="FillCorrectConfigTemplateText" xml:space="preserve"> <data name="FillCorrectConfigTemplateText" xml:space="preserve">
<value>Please fill in the correct config template</value> <value>Please fill in the correct config template</value>

View file

@ -675,8 +675,8 @@
<data name="TbSettingsCore" xml:space="preserve"> <data name="TbSettingsCore" xml:space="preserve">
<value>Ядро: базовые настройки</value> <value>Ядро: базовые настройки</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbCustomDnsRay" xml:space="preserve">
<value>Настройки DNS V2ray</value> <value>V2ray Custom DNS</value>
</data> </data>
<data name="TbSettingsCoreKcp" xml:space="preserve"> <data name="TbSettingsCoreKcp" xml:space="preserve">
<value>Ядро: настройки KCP</value> <value>Ядро: настройки KCP</value>
@ -1011,8 +1011,8 @@
<data name="menuDNSSetting" xml:space="preserve"> <data name="menuDNSSetting" xml:space="preserve">
<value>Настройки DNS</value> <value>Настройки DNS</value>
</data> </data>
<data name="TbSettingsCoreDnsSingbox" xml:space="preserve"> <data name="TbCustomDnsSingbox" xml:space="preserve">
<value>Настройки DNS sing-box</value> <value>sing-box Custom DNS</value>
</data> </data>
<data name="TbDnsSingboxObjectDoc" xml:space="preserve"> <data name="TbDnsSingboxObjectDoc" xml:space="preserve">
<value>Заполните структуру DNS, нажмите, чтобы открыть документ</value> <value>Заполните структуру DNS, нажмите, чтобы открыть документ</value>
@ -1419,19 +1419,10 @@
<data name="TbDomesticDNS" xml:space="preserve"> <data name="TbDomesticDNS" xml:space="preserve">
<value>Внутренний DNS</value> <value>Внутренний DNS</value>
</data> </data>
<data name="TbSBOutboundsResolverDNS" xml:space="preserve"> <data name="TbRemoteDNSTips" xml:space="preserve">
<value>Резолвер DNS для исходящих (sing-box)</value> <value>Via proxy — please ensure remote availability</value>
</data> </data>
<data name="TbSBOutboundDomainResolve" xml:space="preserve"> <data name="TbXrayFreedomStrategy" xml:space="preserve">
<value>Разрешать домены для исходящих соединений</value>
</data>
<data name="TbSBBootstrapDNS" xml:space="preserve">
<value>Bootstrap DNS (sing-box)</value>
</data>
<data name="TbSBFallbackDNSResolve" xml:space="preserve">
<value>Resolve DNS server domains, requires IP</value>
</data>
<data name="TbXrayFreedomResolveStrategy" xml:space="preserve">
<value>Стратегия резолвинга Freedom (Xray)</value> <value>Стратегия резолвинга Freedom (Xray)</value>
</data> </data>
<data name="TbSBDirectResolveStrategy" xml:space="preserve"> <data name="TbSBDirectResolveStrategy" xml:space="preserve">
@ -1471,7 +1462,7 @@
<value>Включён пользовательский DNS — настройки на этой странице не применяются</value> <value>Включён пользовательский DNS — настройки на этой странице не применяются</value>
</data> </data>
<data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve"> <data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve">
<value>Предотвращает сбои доменных правил маршрутизации</value> <value>Block ECH and HTTP/3 availability checks when enabled</value>
</data> </data>
<data name="FillCorrectConfigTemplateText" xml:space="preserve"> <data name="FillCorrectConfigTemplateText" xml:space="preserve">
<value>Пожалуйста, заполните корректный шаблон конфигурации</value> <value>Пожалуйста, заполните корректный шаблон конфигурации</value>

View file

@ -675,8 +675,8 @@
<data name="TbSettingsCore" xml:space="preserve"> <data name="TbSettingsCore" xml:space="preserve">
<value>Core: 基础设置</value> <value>Core: 基础设置</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbCustomDnsRay" xml:space="preserve">
<value>v2ray DNS 设置</value> <value>v2ray 自定义 DNS</value>
</data> </data>
<data name="TbSettingsCoreKcp" xml:space="preserve"> <data name="TbSettingsCoreKcp" xml:space="preserve">
<value>Core: KCP 设置</value> <value>Core: KCP 设置</value>
@ -1008,8 +1008,8 @@
<data name="menuDNSSetting" xml:space="preserve"> <data name="menuDNSSetting" xml:space="preserve">
<value>DNS 设置</value> <value>DNS 设置</value>
</data> </data>
<data name="TbSettingsCoreDnsSingbox" xml:space="preserve"> <data name="TbCustomDnsSingbox" xml:space="preserve">
<value>sing-box DNS 设置</value> <value>sing-box 自定义 DNS</value>
</data> </data>
<data name="TbDnsSingboxObjectDoc" xml:space="preserve"> <data name="TbDnsSingboxObjectDoc" xml:space="preserve">
<value>请填写 DNS JSON 结构,点击查看文档</value> <value>请填写 DNS JSON 结构,点击查看文档</value>
@ -1416,19 +1416,10 @@
<data name="TbDomesticDNS" xml:space="preserve"> <data name="TbDomesticDNS" xml:space="preserve">
<value>直连 DNS</value> <value>直连 DNS</value>
</data> </data>
<data name="TbSBOutboundsResolverDNS" xml:space="preserve"> <data name="TbRemoteDNSTips" xml:space="preserve">
<value>出站 DNS 解析sing-box</value> <value>通过代理,请确保远程可用</value>
</data> </data>
<data name="TbSBOutboundDomainResolve" xml:space="preserve"> <data name="TbXrayFreedomStrategy" xml:space="preserve">
<value>解析出站域名</value>
</data>
<data name="TbSBBootstrapDNS" xml:space="preserve">
<value>Bootstrap DNS (sing-box)</value>
</data>
<data name="TbSBFallbackDNSResolve" xml:space="preserve">
<value>解析 DNS 服务器域名,需指定为 IP</value>
</data>
<data name="TbXrayFreedomResolveStrategy" xml:space="preserve">
<value>xray freedom 解析策略</value> <value>xray freedom 解析策略</value>
</data> </data>
<data name="TbSBDirectResolveStrategy" xml:space="preserve"> <data name="TbSBDirectResolveStrategy" xml:space="preserve">
@ -1468,7 +1459,7 @@
<value>自定义 DNS 已启用,此页面配置将无效</value> <value>自定义 DNS 已启用,此页面配置将无效</value>
</data> </data>
<data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve"> <data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve">
<value>避免域名分流规则失效</value> <value>开启后将阻止 ECH 和 HTTP/3 可用性查询</value>
</data> </data>
<data name="FillCorrectConfigTemplateText" xml:space="preserve"> <data name="FillCorrectConfigTemplateText" xml:space="preserve">
<value>请填写正确的配置模板</value> <value>请填写正确的配置模板</value>

View file

@ -675,8 +675,8 @@
<data name="TbSettingsCore" xml:space="preserve"> <data name="TbSettingsCore" xml:space="preserve">
<value>Core: 基礎設定</value> <value>Core: 基礎設定</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbCustomDnsRay" xml:space="preserve">
<value>V2ray DNS 設定</value> <value>V2ray Custom DNS</value>
</data> </data>
<data name="TbSettingsCoreKcp" xml:space="preserve"> <data name="TbSettingsCoreKcp" xml:space="preserve">
<value>Core: KCP 設定</value> <value>Core: KCP 設定</value>
@ -1008,8 +1008,8 @@
<data name="menuDNSSetting" xml:space="preserve"> <data name="menuDNSSetting" xml:space="preserve">
<value>DNS 設定</value> <value>DNS 設定</value>
</data> </data>
<data name="TbSettingsCoreDnsSingbox" xml:space="preserve"> <data name="TbCustomDnsSingbox" xml:space="preserve">
<value>sing-box DNS 設定</value> <value>sing-box Custom DNS</value>
</data> </data>
<data name="TbDnsSingboxObjectDoc" xml:space="preserve"> <data name="TbDnsSingboxObjectDoc" xml:space="preserve">
<value>請填寫 DNS JSON 結構,點擊查看檔案</value> <value>請填寫 DNS JSON 結構,點擊查看檔案</value>
@ -1416,19 +1416,10 @@
<data name="TbDomesticDNS" xml:space="preserve"> <data name="TbDomesticDNS" xml:space="preserve">
<value>Domestic DNS</value> <value>Domestic DNS</value>
</data> </data>
<data name="TbSBOutboundsResolverDNS" xml:space="preserve"> <data name="TbRemoteDNSTips" xml:space="preserve">
<value>Outbound DNS Resolution (sing-box)</value> <value>Via proxy — please ensure remote availability</value>
</data> </data>
<data name="TbSBOutboundDomainResolve" xml:space="preserve"> <data name="TbXrayFreedomStrategy" xml:space="preserve">
<value>Resolve Outbound Domains</value>
</data>
<data name="TbSBBootstrapDNS" xml:space="preserve">
<value>Bootstrap DNS (sing-box)</value>
</data>
<data name="TbSBFallbackDNSResolve" xml:space="preserve">
<value>Resolve DNS server domains, requires IP</value>
</data>
<data name="TbXrayFreedomResolveStrategy" xml:space="preserve">
<value>xray Freedom Resolution Strategy</value> <value>xray Freedom Resolution Strategy</value>
</data> </data>
<data name="TbSBDirectResolveStrategy" xml:space="preserve"> <data name="TbSBDirectResolveStrategy" xml:space="preserve">
@ -1468,7 +1459,7 @@
<value>Custom DNS Enabled, This Page's Settings Invalid</value> <value>Custom DNS Enabled, This Page's Settings Invalid</value>
</data> </data>
<data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve"> <data name="TbBlockSVCBHTTPSQueriesTips" xml:space="preserve">
<value>Prevent domain-based routing rules from failing</value> <value>Block ECH and HTTP/3 availability checks when enabled</value>
</data> </data>
<data name="FillCorrectConfigTemplateText" xml:space="preserve"> <data name="FillCorrectConfigTemplateText" xml:space="preserve">
<value>Please fill in the correct config template</value> <value>Please fill in the correct config template</value>

View file

@ -235,7 +235,7 @@ public partial class CoreConfigSingboxService(Config config)
} }
singboxConfig.route.default_domain_resolver = new() singboxConfig.route.default_domain_resolver = new()
{ {
server = Global.SingboxFinalResolverTag server = Global.SingboxLocalDNSTag,
}; };
ret.Success = true; ret.Success = true;
@ -308,7 +308,7 @@ public partial class CoreConfigSingboxService(Config config)
} }
singboxConfig.route.default_domain_resolver = new() singboxConfig.route.default_domain_resolver = new()
{ {
server = Global.SingboxFinalResolverTag server = Global.SingboxLocalDNSTag,
}; };
singboxConfig.route.rules.Clear(); singboxConfig.route.rules.Clear();

View file

@ -43,17 +43,7 @@ public partial class CoreConfigSingboxService
}); });
} }
//Outbound Freedom Resolver await GenOutboundDnsRule(node, singboxConfig);
var freedomOutbound = singboxConfig.outbounds?.FirstOrDefault(t => t is { type: "direct", tag: Global.DirectTag });
if (freedomOutbound != null)
{
freedomOutbound.domain_resolver = new()
{
server = Global.SingboxDirectDNSTag,
};
}
await GenOutboundDnsRule(node, singboxConfig, Global.SingboxOutboundResolverTag);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -68,16 +58,12 @@ public partial class CoreConfigSingboxService
var directDns = ParseDnsAddress(simpleDNSItem.DirectDNS); var directDns = ParseDnsAddress(simpleDNSItem.DirectDNS);
directDns.tag = Global.SingboxDirectDNSTag; directDns.tag = Global.SingboxDirectDNSTag;
directDns.domain_resolver = Global.SingboxFinalResolverTag; directDns.domain_resolver = Global.SingboxLocalDNSTag;
var remoteDns = ParseDnsAddress(simpleDNSItem.RemoteDNS); var remoteDns = ParseDnsAddress(simpleDNSItem.RemoteDNS);
remoteDns.tag = Global.SingboxRemoteDNSTag; remoteDns.tag = Global.SingboxRemoteDNSTag;
remoteDns.detour = Global.ProxyTag; remoteDns.detour = Global.ProxyTag;
remoteDns.domain_resolver = Global.SingboxFinalResolverTag; remoteDns.domain_resolver = Global.SingboxLocalDNSTag;
var resolverDns = ParseDnsAddress(simpleDNSItem.SingboxOutboundsResolveDNS);
resolverDns.tag = Global.SingboxOutboundResolverTag;
resolverDns.domain_resolver = Global.SingboxFinalResolverTag;
var hostsDns = new Server4Sbox var hostsDns = new Server4Sbox
{ {
@ -122,10 +108,6 @@ public partial class CoreConfigSingboxService
{ {
remoteDns.domain_resolver = Global.SingboxHostsDNSTag; remoteDns.domain_resolver = Global.SingboxHostsDNSTag;
} }
if (resolverDns.server == host.Key)
{
resolverDns.domain_resolver = Global.SingboxHostsDNSTag;
}
if (directDns.server == host.Key) if (directDns.server == host.Key)
{ {
directDns.domain_resolver = Global.SingboxHostsDNSTag; directDns.domain_resolver = Global.SingboxHostsDNSTag;
@ -136,7 +118,6 @@ public partial class CoreConfigSingboxService
singboxConfig.dns.servers ??= new List<Server4Sbox>(); singboxConfig.dns.servers ??= new List<Server4Sbox>();
singboxConfig.dns.servers.Add(remoteDns); singboxConfig.dns.servers.Add(remoteDns);
singboxConfig.dns.servers.Add(directDns); singboxConfig.dns.servers.Add(directDns);
singboxConfig.dns.servers.Add(resolverDns);
singboxConfig.dns.servers.Add(hostsDns); singboxConfig.dns.servers.Add(hostsDns);
// fake ip // fake ip
@ -157,8 +138,13 @@ public partial class CoreConfigSingboxService
private async Task<Server4Sbox> GenDnsDomains(SingboxConfig singboxConfig, SimpleDNSItem? simpleDNSItem) private async Task<Server4Sbox> GenDnsDomains(SingboxConfig singboxConfig, SimpleDNSItem? simpleDNSItem)
{ {
var finalDns = ParseDnsAddress(simpleDNSItem.SingboxFinalResolveDNS); var finalDnsAddress = "local";
finalDns.tag = Global.SingboxFinalResolverTag; if (_config.TunModeItem.EnableTun)
{
finalDnsAddress = "dhcp://auto";
}
var finalDns = ParseDnsAddress(finalDnsAddress);
finalDns.tag = Global.SingboxLocalDNSTag;
singboxConfig.dns ??= new Dns4Sbox(); singboxConfig.dns ??= new Dns4Sbox();
singboxConfig.dns.servers ??= new List<Server4Sbox>(); singboxConfig.dns.servers ??= new List<Server4Sbox>();
singboxConfig.dns.servers.Add(finalDns); singboxConfig.dns.servers.Add(finalDns);
@ -352,7 +338,7 @@ public partial class CoreConfigSingboxService
await GenDnsDomainsLegacyCompatible(singboxConfig, item); await GenDnsDomainsLegacyCompatible(singboxConfig, item);
} }
await GenOutboundDnsRule(node, singboxConfig, Global.SingboxFinalResolverTag); await GenOutboundDnsRule(node, singboxConfig);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -361,16 +347,17 @@ public partial class CoreConfigSingboxService
return 0; return 0;
} }
private async Task<int> GenDnsDomainsCompatible(SingboxConfig singboxConfig, DNSItem? dNSItem) private async Task<int> GenDnsDomainsCompatible(SingboxConfig singboxConfig, DNSItem? dnsItem)
{ {
var dns4Sbox = singboxConfig.dns ?? new(); var dns4Sbox = singboxConfig.dns ?? new();
dns4Sbox.servers ??= []; dns4Sbox.servers ??= [];
dns4Sbox.rules ??= []; dns4Sbox.rules ??= [];
var tag = Global.SingboxFinalResolverTag; var tag = Global.SingboxLocalDNSTag;
var localDnsAddress = string.IsNullOrEmpty(dNSItem?.DomainDNSAddress) ? Global.DomainPureIPDNSAddress.FirstOrDefault() : dNSItem?.DomainDNSAddress;
var localDnsServer = ParseDnsAddress(localDnsAddress); var finalDnsAddress = string.IsNullOrEmpty(dnsItem?.DomainDNSAddress) ? Global.DomainPureIPDNSAddress.FirstOrDefault() : dnsItem?.DomainDNSAddress;
var localDnsServer = ParseDnsAddress(finalDnsAddress);
localDnsServer.tag = tag; localDnsServer.tag = tag;
dns4Sbox.servers.Add(localDnsServer); dns4Sbox.servers.Add(localDnsServer);
@ -379,19 +366,19 @@ public partial class CoreConfigSingboxService
return await Task.FromResult(0); return await Task.FromResult(0);
} }
private async Task<int> GenDnsDomainsLegacyCompatible(SingboxConfig singboxConfig, DNSItem? dNSItem) private async Task<int> GenDnsDomainsLegacyCompatible(SingboxConfig singboxConfig, DNSItem? dnsItem)
{ {
var dns4Sbox = singboxConfig.dns ?? new(); var dns4Sbox = singboxConfig.dns ?? new();
dns4Sbox.servers ??= []; dns4Sbox.servers ??= [];
dns4Sbox.rules ??= []; dns4Sbox.rules ??= [];
var tag = Global.SingboxFinalResolverTag; var tag = Global.SingboxLocalDNSTag;
dns4Sbox.servers.Add(new() dns4Sbox.servers.Add(new()
{ {
tag = tag, tag = tag,
address = string.IsNullOrEmpty(dNSItem?.DomainDNSAddress) ? Global.DomainPureIPDNSAddress.FirstOrDefault() : dNSItem?.DomainDNSAddress, address = string.IsNullOrEmpty(dnsItem?.DomainDNSAddress) ? Global.DomainPureIPDNSAddress.FirstOrDefault() : dnsItem?.DomainDNSAddress,
detour = Global.DirectTag, detour = Global.DirectTag,
strategy = string.IsNullOrEmpty(dNSItem?.DomainStrategy4Freedom) ? null : dNSItem?.DomainStrategy4Freedom, strategy = string.IsNullOrEmpty(dnsItem?.DomainStrategy4Freedom) ? null : dnsItem?.DomainStrategy4Freedom,
}); });
dns4Sbox.rules.Insert(0, new() dns4Sbox.rules.Insert(0, new()
{ {
@ -422,7 +409,7 @@ public partial class CoreConfigSingboxService
return await Task.FromResult(0); return await Task.FromResult(0);
} }
private async Task<int> GenOutboundDnsRule(ProfileItem? node, SingboxConfig singboxConfig, string? server) private async Task<int> GenOutboundDnsRule(ProfileItem? node, SingboxConfig singboxConfig)
{ {
if (node == null) if (node == null)
{ {
@ -449,7 +436,7 @@ public partial class CoreConfigSingboxService
singboxConfig.dns.rules ??= new List<Rule4Sbox>(); singboxConfig.dns.rules ??= new List<Rule4Sbox>();
singboxConfig.dns.rules.Insert(0, new Rule4Sbox singboxConfig.dns.rules.Insert(0, new Rule4Sbox
{ {
server = server, server = Global.SingboxLocalDNSTag,
domain = domain, domain = domain,
}); });

View file

@ -9,13 +9,13 @@ public partial class CoreConfigSingboxService
singboxConfig.route.final = Global.ProxyTag; singboxConfig.route.final = Global.ProxyTag;
var item = _config.SimpleDNSItem; var item = _config.SimpleDNSItem;
var defaultDomainResolverTag = Global.SingboxOutboundResolverTag; var defaultDomainResolverTag = Global.SingboxDirectDNSTag;
var directDNSStrategy = item.SingboxStrategy4Direct.IsNullOrEmpty() ? Global.SingboxDomainStrategy4Out.FirstOrDefault() : item.SingboxStrategy4Direct; var directDNSStrategy = item.SingboxStrategy4Direct.IsNullOrEmpty() ? Global.SingboxDomainStrategy4Out.FirstOrDefault() : item.SingboxStrategy4Direct;
var rawDNSItem = await AppManager.Instance.GetDNSItem(ECoreType.sing_box); var rawDNSItem = await AppManager.Instance.GetDNSItem(ECoreType.sing_box);
if (rawDNSItem != null && rawDNSItem.Enabled == true) if (rawDNSItem != null && rawDNSItem.Enabled == true)
{ {
defaultDomainResolverTag = Global.SingboxFinalResolverTag; defaultDomainResolverTag = Global.SingboxLocalDNSTag;
directDNSStrategy = rawDNSItem.DomainStrategy4Freedom.IsNullOrEmpty() ? Global.SingboxDomainStrategy4Out.FirstOrDefault() : rawDNSItem.DomainStrategy4Freedom; directDNSStrategy = rawDNSItem.DomainStrategy4Freedom.IsNullOrEmpty() ? Global.SingboxDomainStrategy4Out.FirstOrDefault() : rawDNSItem.DomainStrategy4Freedom;
} }
singboxConfig.route.default_domain_resolver = new() singboxConfig.route.default_domain_resolver = new()

View file

@ -354,7 +354,7 @@ public partial class CoreConfigV2rayService
return 0; return 0;
} }
private async Task<int> GenDnsDomainsCompatible(ProfileItem? node, JsonNode dns, DNSItem? dNSItem) private async Task<int> GenDnsDomainsCompatible(ProfileItem? node, JsonNode dns, DNSItem? dnsItem)
{ {
if (node == null) if (node == null)
{ {
@ -393,7 +393,7 @@ public partial class CoreConfigV2rayService
{ {
var dnsServer = new DnsServer4Ray() var dnsServer = new DnsServer4Ray()
{ {
address = string.IsNullOrEmpty(dNSItem?.DomainDNSAddress) ? Global.DomainPureIPDNSAddress.FirstOrDefault() : dNSItem?.DomainDNSAddress, address = string.IsNullOrEmpty(dnsItem?.DomainDNSAddress) ? Global.DomainPureIPDNSAddress.FirstOrDefault() : dnsItem?.DomainDNSAddress,
skipFallback = true, skipFallback = true,
domains = domainList domains = domainList
}; };

View file

@ -13,8 +13,6 @@ public class DNSSettingViewModel : MyReactiveObject
[Reactive] public bool? BlockBindingQuery { get; set; } [Reactive] public bool? BlockBindingQuery { get; set; }
[Reactive] public string? DirectDNS { get; set; } [Reactive] public string? DirectDNS { get; set; }
[Reactive] public string? RemoteDNS { get; set; } [Reactive] public string? RemoteDNS { get; set; }
[Reactive] public string? SingboxOutboundsResolveDNS { get; set; }
[Reactive] public string? SingboxFinalResolveDNS { get; set; }
[Reactive] public string? RayStrategy4Freedom { get; set; } [Reactive] public string? RayStrategy4Freedom { get; set; }
[Reactive] public string? SingboxStrategy4Direct { get; set; } [Reactive] public string? SingboxStrategy4Direct { get; set; }
[Reactive] public string? SingboxStrategy4Proxy { get; set; } [Reactive] public string? SingboxStrategy4Proxy { get; set; }
@ -76,8 +74,6 @@ public class DNSSettingViewModel : MyReactiveObject
DirectDNS = item.DirectDNS; DirectDNS = item.DirectDNS;
RemoteDNS = item.RemoteDNS; RemoteDNS = item.RemoteDNS;
RayStrategy4Freedom = item.RayStrategy4Freedom; RayStrategy4Freedom = item.RayStrategy4Freedom;
SingboxOutboundsResolveDNS = item.SingboxOutboundsResolveDNS;
SingboxFinalResolveDNS = item.SingboxFinalResolveDNS;
SingboxStrategy4Direct = item.SingboxStrategy4Direct; SingboxStrategy4Direct = item.SingboxStrategy4Direct;
SingboxStrategy4Proxy = item.SingboxStrategy4Proxy; SingboxStrategy4Proxy = item.SingboxStrategy4Proxy;
Hosts = item.Hosts; Hosts = item.Hosts;
@ -107,8 +103,6 @@ public class DNSSettingViewModel : MyReactiveObject
_config.SimpleDNSItem.DirectDNS = DirectDNS; _config.SimpleDNSItem.DirectDNS = DirectDNS;
_config.SimpleDNSItem.RemoteDNS = RemoteDNS; _config.SimpleDNSItem.RemoteDNS = RemoteDNS;
_config.SimpleDNSItem.RayStrategy4Freedom = RayStrategy4Freedom; _config.SimpleDNSItem.RayStrategy4Freedom = RayStrategy4Freedom;
_config.SimpleDNSItem.SingboxOutboundsResolveDNS = SingboxOutboundsResolveDNS;
_config.SimpleDNSItem.SingboxFinalResolveDNS = SingboxFinalResolveDNS;
_config.SimpleDNSItem.SingboxStrategy4Direct = SingboxStrategy4Direct; _config.SimpleDNSItem.SingboxStrategy4Direct = SingboxStrategy4Direct;
_config.SimpleDNSItem.SingboxStrategy4Proxy = SingboxStrategy4Proxy; _config.SimpleDNSItem.SingboxStrategy4Proxy = SingboxStrategy4Proxy;
_config.SimpleDNSItem.Hosts = Hosts; _config.SimpleDNSItem.Hosts = Hosts;

View file

@ -76,100 +76,65 @@
Width="300" Width="300"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
IsEditable="True" /> IsEditable="True" />
<TextBlock <TextBlock
Grid.Row="3" Grid.Row="2"
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbSBOutboundsResolverDNS}" />
<ComboBox
x:Name="cmbSBResolverDNS"
Grid.Row="3"
Grid.Column="1"
Width="300"
Margin="{StaticResource Margin4}"
IsEditable="True" />
<TextBlock
Grid.Row="3"
Grid.Column="2" Grid.Column="2"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbSBOutboundDomainResolve}" Text="{x:Static resx:ResUI.TbRemoteDNSTips}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<TextBlock <TextBlock
Grid.Row="4" Grid.Row="3"
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbSBBootstrapDNS}" /> Text="{x:Static resx:ResUI.TbXrayFreedomStrategy}" />
<ComboBox
x:Name="cmbSBFinalResolverDNS"
Grid.Row="4"
Grid.Column="1"
Width="300"
Margin="{StaticResource Margin4}"
IsEditable="True" />
<TextBlock
Grid.Row="4"
Grid.Column="2"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbSBFallbackDNSResolve}"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="5"
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbXrayFreedomResolveStrategy}" />
<ComboBox <ComboBox
x:Name="cmbRayFreedomDNSStrategy" x:Name="cmbRayFreedomDNSStrategy"
Grid.Row="5" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Width="200" Width="200"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
PlaceholderText="Default" /> PlaceholderText="Default" />
<TextBlock <TextBlock
Grid.Row="6" Grid.Row="4"
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbSBDirectResolveStrategy}" /> Text="{x:Static resx:ResUI.TbSBDirectResolveStrategy}" />
<ComboBox <ComboBox
x:Name="cmbSBDirectDNSStrategy" x:Name="cmbSBDirectDNSStrategy"
Grid.Row="6" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Width="200" Width="200"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
PlaceholderText="Default" /> PlaceholderText="Default" />
<TextBlock <TextBlock
Grid.Row="7" Grid.Row="5"
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbSBRemoteResolveStrategy}" /> Text="{x:Static resx:ResUI.TbSBRemoteResolveStrategy}" />
<ComboBox <ComboBox
x:Name="cmbSBRemoteDNSStrategy" x:Name="cmbSBRemoteDNSStrategy"
Grid.Row="7" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
Width="200" Width="200"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
PlaceholderText="Default" /> PlaceholderText="Default" />
<TextBlock <TextBlock
Grid.Row="8" Grid.Row="6"
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbAddCommonDNSHosts}" /> Text="{x:Static resx:ResUI.TbAddCommonDNSHosts}" />
<ToggleSwitch <ToggleSwitch
x:Name="togAddCommonHosts" x:Name="togAddCommonHosts"
Grid.Row="8" Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Margin="{StaticResource Margin4}" Margin="{StaticResource Margin4}"
HorizontalAlignment="Left" /> HorizontalAlignment="Left" />
@ -290,7 +255,7 @@
</ScrollViewer> </ScrollViewer>
</TabItem> </TabItem>
<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreDns}"> <TabItem Header="{x:Static resx:ResUI.TbCustomDnsRay}">
<DockPanel Margin="{StaticResource Margin8}"> <DockPanel Margin="{StaticResource Margin8}">
<Grid DockPanel.Dock="Top"> <Grid DockPanel.Dock="Top">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@ -378,7 +343,7 @@
</DockPanel> </DockPanel>
</TabItem> </TabItem>
<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreDnsSingbox}"> <TabItem Header="{x:Static resx:ResUI.TbCustomDnsSingbox}">
<DockPanel Margin="{StaticResource Margin8}"> <DockPanel Margin="{StaticResource Margin8}">
<Grid DockPanel.Dock="Top"> <Grid DockPanel.Dock="Top">
<Grid.RowDefinitions> <Grid.RowDefinitions>

View file

@ -24,9 +24,7 @@ public partial class DNSSettingWindow : WindowBase<DNSSettingViewModel>
cmbSBDirectDNSStrategy.ItemsSource = Global.SingboxDomainStrategy4Out; cmbSBDirectDNSStrategy.ItemsSource = Global.SingboxDomainStrategy4Out;
cmbSBRemoteDNSStrategy.ItemsSource = Global.SingboxDomainStrategy4Out; cmbSBRemoteDNSStrategy.ItemsSource = Global.SingboxDomainStrategy4Out;
cmbDirectDNS.ItemsSource = Global.DomainDirectDNSAddress; cmbDirectDNS.ItemsSource = Global.DomainDirectDNSAddress;
cmbSBResolverDNS.ItemsSource = Global.DomainDirectDNSAddress.Concat(new[] { "dhcp://auto,localhost" });
cmbRemoteDNS.ItemsSource = Global.DomainRemoteDNSAddress; cmbRemoteDNS.ItemsSource = Global.DomainRemoteDNSAddress;
cmbSBFinalResolverDNS.ItemsSource = Global.DomainPureIPDNSAddress.Concat(new[] { "dhcp://auto,localhost" });
cmbDirectExpectedIPs.ItemsSource = Global.ExpectedIPs; cmbDirectExpectedIPs.ItemsSource = Global.ExpectedIPs;
cmbdomainStrategy4FreedomCompatible.ItemsSource = Global.DomainStrategy4Freedoms; cmbdomainStrategy4FreedomCompatible.ItemsSource = Global.DomainStrategy4Freedoms;
@ -42,8 +40,6 @@ public partial class DNSSettingWindow : WindowBase<DNSSettingViewModel>
this.Bind(ViewModel, vm => vm.BlockBindingQuery, v => v.togBlockBindingQuery.IsChecked).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.BlockBindingQuery, v => v.togBlockBindingQuery.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.DirectDNS, v => v.cmbDirectDNS.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.DirectDNS, v => v.cmbDirectDNS.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.RemoteDNS, v => v.cmbRemoteDNS.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.RemoteDNS, v => v.cmbRemoteDNS.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SingboxOutboundsResolveDNS, v => v.cmbSBResolverDNS.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SingboxFinalResolveDNS, v => v.cmbSBFinalResolverDNS.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.RayStrategy4Freedom, v => v.cmbRayFreedomDNSStrategy.SelectedItem).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.RayStrategy4Freedom, v => v.cmbRayFreedomDNSStrategy.SelectedItem).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SingboxStrategy4Direct, v => v.cmbSBDirectDNSStrategy.SelectedItem).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SingboxStrategy4Direct, v => v.cmbSBDirectDNSStrategy.SelectedItem).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SingboxStrategy4Proxy, v => v.cmbSBRemoteDNSStrategy.SelectedItem).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SingboxStrategy4Proxy, v => v.cmbSBRemoteDNSStrategy.SelectedItem).DisposeWith(disposables);

View file

@ -100,65 +100,25 @@
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
IsEditable="True" IsEditable="True"
Style="{StaticResource DefComboBox}" /> Style="{StaticResource DefComboBox}" />
<TextBlock <TextBlock
Grid.Row="3" Grid.Row="2"
Grid.Column="0"
Margin="{StaticResource Margin8}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSBOutboundsResolverDNS}" />
<ComboBox
x:Name="cmbSBResolverDNS"
Grid.Row="3"
Grid.Column="1"
Width="300"
Margin="{StaticResource Margin8}"
IsEditable="True"
Style="{StaticResource DefComboBox}" />
<TextBlock
Grid.Row="3"
Grid.Column="2" Grid.Column="2"
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSBOutboundDomainResolve}" Text="{x:Static resx:ResUI.TbRemoteDNSTips}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<TextBlock <TextBlock
Grid.Row="4" Grid.Row="3"
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSBBootstrapDNS}" /> Text="{x:Static resx:ResUI.TbXrayFreedomStrategy}" />
<ComboBox
x:Name="cmbSBFinalResolverDNS"
Grid.Row="4"
Grid.Column="1"
Width="300"
Margin="{StaticResource Margin8}"
IsEditable="True"
Style="{StaticResource DefComboBox}" />
<TextBlock
Grid.Row="4"
Grid.Column="2"
Margin="{StaticResource Margin8}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSBFallbackDNSResolve}"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="5"
Grid.Column="0"
Margin="{StaticResource Margin8}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbXrayFreedomResolveStrategy}" />
<ComboBox <ComboBox
x:Name="cmbRayFreedomDNSStrategy" x:Name="cmbRayFreedomDNSStrategy"
Grid.Row="5" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Width="200" Width="200"
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
@ -166,7 +126,7 @@
Style="{StaticResource DefComboBox}" /> Style="{StaticResource DefComboBox}" />
<TextBlock <TextBlock
Grid.Row="6" Grid.Row="4"
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -174,7 +134,7 @@
Text="{x:Static resx:ResUI.TbSBDirectResolveStrategy}" /> Text="{x:Static resx:ResUI.TbSBDirectResolveStrategy}" />
<ComboBox <ComboBox
x:Name="cmbSBDirectDNSStrategy" x:Name="cmbSBDirectDNSStrategy"
Grid.Row="6" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Width="200" Width="200"
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
@ -182,7 +142,7 @@
Style="{StaticResource DefComboBox}" /> Style="{StaticResource DefComboBox}" />
<TextBlock <TextBlock
Grid.Row="7" Grid.Row="5"
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -190,7 +150,7 @@
Text="{x:Static resx:ResUI.TbSBRemoteResolveStrategy}" /> Text="{x:Static resx:ResUI.TbSBRemoteResolveStrategy}" />
<ComboBox <ComboBox
x:Name="cmbSBRemoteDNSStrategy" x:Name="cmbSBRemoteDNSStrategy"
Grid.Row="7" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
Width="200" Width="200"
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
@ -198,7 +158,7 @@
Style="{StaticResource DefComboBox}" /> Style="{StaticResource DefComboBox}" />
<TextBlock <TextBlock
Grid.Row="8" Grid.Row="6"
Grid.Column="0" Grid.Column="0"
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -206,7 +166,7 @@
Text="{x:Static resx:ResUI.TbAddCommonDNSHosts}" /> Text="{x:Static resx:ResUI.TbAddCommonDNSHosts}" />
<ToggleButton <ToggleButton
x:Name="togAddCommonHosts" x:Name="togAddCommonHosts"
Grid.Row="8" Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Margin="{StaticResource Margin8}" Margin="{StaticResource Margin8}"
HorizontalAlignment="Left" /> HorizontalAlignment="Left" />
@ -348,7 +308,7 @@
</ScrollViewer> </ScrollViewer>
</TabItem> </TabItem>
<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreDns}"> <TabItem Header="{x:Static resx:ResUI.TbCustomDnsRay}">
<DockPanel Margin="{StaticResource Margin8}"> <DockPanel Margin="{StaticResource Margin8}">
<Grid DockPanel.Dock="Top"> <Grid DockPanel.Dock="Top">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@ -445,7 +405,7 @@
</DockPanel> </DockPanel>
</TabItem> </TabItem>
<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreDnsSingbox}"> <TabItem Header="{x:Static resx:ResUI.TbCustomDnsSingbox}">
<DockPanel Margin="{StaticResource Margin8}"> <DockPanel Margin="{StaticResource Margin8}">
<Grid DockPanel.Dock="Top"> <Grid DockPanel.Dock="Top">
<Grid.RowDefinitions> <Grid.RowDefinitions>

View file

@ -22,9 +22,7 @@ public partial class DNSSettingWindow
cmbSBDirectDNSStrategy.ItemsSource = Global.SingboxDomainStrategy4Out; cmbSBDirectDNSStrategy.ItemsSource = Global.SingboxDomainStrategy4Out;
cmbSBRemoteDNSStrategy.ItemsSource = Global.SingboxDomainStrategy4Out; cmbSBRemoteDNSStrategy.ItemsSource = Global.SingboxDomainStrategy4Out;
cmbDirectDNS.ItemsSource = Global.DomainDirectDNSAddress; cmbDirectDNS.ItemsSource = Global.DomainDirectDNSAddress;
cmbSBResolverDNS.ItemsSource = Global.DomainDirectDNSAddress.Concat(new[] { "dhcp://auto,localhost" });
cmbRemoteDNS.ItemsSource = Global.DomainRemoteDNSAddress; cmbRemoteDNS.ItemsSource = Global.DomainRemoteDNSAddress;
cmbSBFinalResolverDNS.ItemsSource = Global.DomainPureIPDNSAddress.Concat(new[] { "dhcp://auto,localhost" });
cmbDirectExpectedIPs.ItemsSource = Global.ExpectedIPs; cmbDirectExpectedIPs.ItemsSource = Global.ExpectedIPs;
cmbdomainStrategy4FreedomCompatible.ItemsSource = Global.DomainStrategy4Freedoms; cmbdomainStrategy4FreedomCompatible.ItemsSource = Global.DomainStrategy4Freedoms;
@ -40,8 +38,6 @@ public partial class DNSSettingWindow
this.Bind(ViewModel, vm => vm.BlockBindingQuery, v => v.togBlockBindingQuery.IsChecked).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.BlockBindingQuery, v => v.togBlockBindingQuery.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.DirectDNS, v => v.cmbDirectDNS.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.DirectDNS, v => v.cmbDirectDNS.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.RemoteDNS, v => v.cmbRemoteDNS.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.RemoteDNS, v => v.cmbRemoteDNS.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SingboxOutboundsResolveDNS, v => v.cmbSBResolverDNS.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SingboxFinalResolveDNS, v => v.cmbSBFinalResolverDNS.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.RayStrategy4Freedom, v => v.cmbRayFreedomDNSStrategy.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.RayStrategy4Freedom, v => v.cmbRayFreedomDNSStrategy.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SingboxStrategy4Direct, v => v.cmbSBDirectDNSStrategy.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SingboxStrategy4Direct, v => v.cmbSBDirectDNSStrategy.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SingboxStrategy4Proxy, v => v.cmbSBRemoteDNSStrategy.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SingboxStrategy4Proxy, v => v.cmbSBRemoteDNSStrategy.Text).DisposeWith(disposables);