Compare commits

..

3 commits

Author SHA1 Message Date
DHR60
1f7609cc22 Fix 2026-01-31 11:44:11 +08:00
DHR60
45d9db2c5a Add ParallelQuery and ServeStale features 2026-01-31 11:10:47 +08:00
DHR60
21ca5c10b8 Simplify DNS Settings 2026-01-31 10:22:18 +08:00
21 changed files with 100 additions and 340 deletions

View file

@ -31,7 +31,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
uses: actions/checkout@v6.0.1
with:
submodules: 'recursive'
fetch-depth: '0'
@ -103,67 +103,14 @@ jobs:
steps:
- name: Prepare tools (Red Hat)
shell: bash
run: |
set -euo pipefail
. /etc/os-release
EL_MAJOR="${VERSION_ID%%.*}"
echo "EL_MAJOR=${EL_MAJOR}"
dnf -y makecache || true
command -v curl >/dev/null || dnf -y install curl ca-certificates
ARCH="$(uname -m)"
case "$ARCH" in x86_64|aarch64) ;; *) echo "Unsupported arch: $ARCH"; exit 1 ;; esac
install_epel_from_dir() {
local base="$1" rpm
echo "Try: $base"
rpm="$(
{
curl -fsSL "$base/Packages/" 2>/dev/null
curl -fsSL "$base/Packages/e/" 2>/dev/null | sed 's|href="|href="e/|'
} |
sed -n 's/.*href="\([^"]*epel-release-[^"]*\.noarch\.rpm\)".*/\1/p' |
sort -V | tail -n1
)" || true
if [[ -n "$rpm" ]]; then
dnf -y install "$base/Packages/$rpm"
return 0
fi
return 1
}
FEDORA="https://dl.fedoraproject.org/pub/epel/epel-release-latest-${EL_MAJOR}.noarch.rpm"
echo "Try Fedora: $FEDORA"
if curl -fsSLI "$FEDORA" >/dev/null; then
dnf -y install "$FEDORA"
else
ROCKY="https://dl.rockylinux.org/pub/rocky/${EL_MAJOR}/extras/${ARCH}/os"
if install_epel_from_dir "$ROCKY"; then
:
else
ALMA="https://repo.almalinux.org/almalinux/${EL_MAJOR}/extras/${ARCH}/os"
if install_epel_from_dir "$ALMA"; then
:
else
echo "EPEL bootstrap failed (Fedora/Rocky/Alma)"
exit 1
fi
fi
fi
dnf -y install sudo git rpm-build rpmdevtools dnf-plugins-core \
rsync findutils tar gzip unzip which
dnf repolist | grep -i epel || true
dnf repolist all
dnf -y makecache
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
dnf -y install sudo git rpm-build rpmdevtools dnf-plugins-core rsync findutils tar gzip unzip which
- name: Checkout repo (for scripts)
uses: actions/checkout@v6.0.2
uses: actions/checkout@v6.0.1
with:
submodules: 'recursive'
fetch-depth: '0'

View file

@ -26,7 +26,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
uses: actions/checkout@v6.0.1
with:
submodules: 'recursive'
fetch-depth: '0'

View file

@ -26,7 +26,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
uses: actions/checkout@v6.0.1
with:
submodules: 'recursive'
fetch-depth: '0'

View file

@ -27,7 +27,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
uses: actions/checkout@v6.0.1
- name: Setup
uses: actions/setup-dotnet@v5.0.1

View file

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>7.17.3</Version>
<Version>7.17.2</Version>
</PropertyGroup>
<PropertyGroup>

View file

@ -5,7 +5,7 @@
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Avalonia.AvaloniaEdit" Version="11.4.0" />
<PackageVersion Include="Avalonia.AvaloniaEdit" Version="11.3.0" />
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.11" />
<PackageVersion Include="Avalonia.Desktop" Version="11.3.11" />
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.11" />
@ -22,7 +22,7 @@
<PackageVersion Include="Semi.Avalonia" Version="11.3.7.2" />
<PackageVersion Include="Semi.Avalonia.AvaloniaEdit" Version="11.2.0.1" />
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.3.7.2" />
<PackageVersion Include="NLog" Version="6.1.0" />
<PackageVersion Include="NLog" Version="6.0.7" />
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
<PackageVersion Include="WebDav.Client" Version="2.9.0" />

View file

@ -288,16 +288,6 @@ public class Global
"dns"
];
public static readonly Dictionary<string, string> KcpHeaderMaskMap = new()
{
{ "srtp", "header-srtp" },
{ "utp", "header-utp" },
{ "wechat-video", "header-wechat" },
{ "dtls", "header-dtls" },
{ "wireguard", "header-wireguard" },
{ "dns", "header-dns" }
};
public static readonly List<string> CoreTypes =
[
"Xray",
@ -611,20 +601,20 @@ public class Global
public static readonly Dictionary<string, List<string>> PredefinedHosts = new()
{
{ "dns.google", ["8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844"] },
{ "dns.alidns.com", ["223.5.5.5", "223.6.6.6", "2400:3200::1", "2400:3200:baba::1"] },
{ "one.one.one.one", ["1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001"] },
{ "1dot1dot1dot1.cloudflare-dns.com", ["1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001"] },
{ "cloudflare-dns.com", ["104.16.249.249", "104.16.248.249", "2606:4700::6810:f8f9", "2606:4700::6810:f9f9"] },
{ "dns.cloudflare.com", ["104.16.132.229", "104.16.133.229", "2606:4700::6810:84e5", "2606:4700::6810:85e5"] },
{ "dot.pub", ["1.12.12.12", "120.53.53.53"] },
{ "doh.pub", ["1.12.12.12", "120.53.53.53"] },
{ "dns.quad9.net", ["9.9.9.9", "149.112.112.112", "2620:fe::fe", "2620:fe::9"] },
{ "dns.yandex.net", ["77.88.8.8", "77.88.8.1", "2a02:6b8::feed:0ff", "2a02:6b8:0:1::feed:0ff"] },
{ "dns.sb", ["185.222.222.222", "2a09::"] },
{ "dns.umbrella.com", ["208.67.220.220", "208.67.222.222", "2620:119:35::35", "2620:119:53::53"] },
{ "dns.sse.cisco.com", ["208.67.220.220", "208.67.222.222", "2620:119:35::35", "2620:119:53::53"] },
{ "engage.cloudflareclient.com", ["162.159.192.1"] }
{ "dns.google", new List<string> { "8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844" } },
{ "dns.alidns.com", new List<string> { "223.5.5.5", "223.6.6.6", "2400:3200::1", "2400:3200:baba::1" } },
{ "one.one.one.one", new List<string> { "1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001" } },
{ "1dot1dot1dot1.cloudflare-dns.com", new List<string> { "1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001" } },
{ "cloudflare-dns.com", new List<string> { "104.16.249.249", "104.16.248.249", "2606:4700::6810:f8f9", "2606:4700::6810:f9f9" } },
{ "dns.cloudflare.com", new List<string> { "104.16.132.229", "104.16.133.229", "2606:4700::6810:84e5", "2606:4700::6810:85e5" } },
{ "dot.pub", new List<string> { "1.12.12.12", "120.53.53.53" } },
{ "doh.pub", new List<string> { "1.12.12.12", "120.53.53.53" } },
{ "dns.quad9.net", new List<string> { "9.9.9.9", "149.112.112.112", "2620:fe::fe", "2620:fe::9" } },
{ "dns.yandex.net", new List<string> { "77.88.8.8", "77.88.8.1", "2a02:6b8::feed:0ff", "2a02:6b8:0:1::feed:0ff" } },
{ "dns.sb", new List<string> { "185.222.222.222", "2a09::" } },
{ "dns.umbrella.com", new List<string> { "208.67.220.220", "208.67.222.222", "2620:119:35::35", "2620:119:53::53" } },
{ "dns.sse.cisco.com", new List<string> { "208.67.220.220", "208.67.222.222", "2620:119:35::35", "2620:119:53::53" } },
{ "engage.cloudflareclient.com", new List<string> { "162.159.192.1", "2606:4700:d0::a29f:c001" } }
};
public static readonly List<string> ExpectedIPs =

View file

@ -226,7 +226,7 @@ public class CoreManager
{
if (mayNeedSudo
&& _config.TunModeItem.EnableTun
&& (coreInfo.CoreType is ECoreType.sing_box or ECoreType.mihomo)
&& coreInfo.CoreType == ECoreType.sing_box
&& Utils.IsNonWindows())
{
_linuxSudo = true;

View file

@ -341,7 +341,7 @@ public class StreamSettings4Ray
public HysteriaSettings4Ray? hysteriaSettings { get; set; }
public FinalMask4Ray? finalmask { get; set; }
public List<UdpMasks4Ray>? udpmasks { get; set; }
public Sockopt4Ray? sockopt { get; set; }
}
@ -386,6 +386,8 @@ public class Header4Ray
public object request { get; set; }
public object response { get; set; }
public string? domain { get; set; }
}
public class KcpSettings4Ray
@ -403,6 +405,10 @@ public class KcpSettings4Ray
public int readBufferSize { get; set; }
public int writeBufferSize { get; set; }
public Header4Ray header { get; set; }
public string seed { get; set; }
}
public class WsSettings4Ray
@ -476,22 +482,15 @@ public class HysteriaUdpHop4Ray
public int? interval { get; set; }
}
public class FinalMask4Ray
{
public List<Mask4Ray>? tcp { get; set; }
public List<Mask4Ray>? udp { get; set; }
}
public class Mask4Ray
public class UdpMasks4Ray
{
public string type { get; set; }
public MaskSettings4Ray? settings { get; set; }
public UdpMasksSettings4Ray? settings { get; set; }
}
public class MaskSettings4Ray
public class UdpMasksSettings4Ray
{
public string? password { get; set; }
public string? domain { get; set; }
}
public class AccountsItem4Ray

View file

@ -2728,7 +2728,7 @@ namespace ServiceLib.Resx {
}
/// <summary>
/// 查找类似 Direct Target Resolution Strategy 的本地化字符串。
/// 查找类似 Direct Resolution Strategy 的本地化字符串。
/// </summary>
public static string TbDirectResolveStrategy {
get {
@ -2736,15 +2736,6 @@ namespace ServiceLib.Resx {
}
}
/// <summary>
/// 查找类似 If unset or &quot;AsIs&quot;, DNS resolution uses the system DNS; otherwise, the internal DNS module is used. 的本地化字符串。
/// </summary>
public static string TbDirectResolveStrategyTips {
get {
return ResourceManager.GetString("TbDirectResolveStrategyTips", resourceCulture);
}
}
/// <summary>
/// 查找类似 Display GUI 的本地化字符串。
/// </summary>
@ -2817,15 +2808,6 @@ namespace ServiceLib.Resx {
}
}
/// <summary>
/// 查找类似 By default, invoked only during routing for resolution 的本地化字符串。
/// </summary>
public static string TbDomesticDNSTips {
get {
return ResourceManager.GetString("TbDomesticDNSTips", resourceCulture);
}
}
/// <summary>
/// 查找类似 EchConfigList 的本地化字符串。
/// </summary>
@ -3250,7 +3232,7 @@ namespace ServiceLib.Resx {
}
/// <summary>
/// 查找类似 By default, invoked only during routing for resolution; ensure the remote server can reach this DNS 的本地化字符串。
/// 查找类似 Via proxy — please ensure remote availability 的本地化字符串。
/// </summary>
public static string TbRemoteDNSTips {
get {
@ -3259,7 +3241,7 @@ namespace ServiceLib.Resx {
}
/// <summary>
/// 查找类似 Proxy Target Resolution Strategy 的本地化字符串。
/// 查找类似 Remote Resolution Strategy 的本地化字符串。
/// </summary>
public static string TbRemoteResolveStrategy {
get {
@ -3267,15 +3249,6 @@ namespace ServiceLib.Resx {
}
}
/// <summary>
/// 查找类似 If unset or &quot;AsIs&quot;, DNS resolution is performed by the remote server&apos;s DNS; otherwise, the internal DNS module is used. 的本地化字符串。
/// </summary>
public static string TbRemoteResolveStrategyTips {
get {
return ResourceManager.GetString("TbRemoteResolveStrategyTips", resourceCulture);
}
}
/// <summary>
/// 查找类似 Camouflage domain(host) 的本地化字符串。
/// </summary>
@ -4456,7 +4429,7 @@ namespace ServiceLib.Resx {
}
/// <summary>
/// 查找类似 When configured, validates IPs returned for regional domains (e.g., geosite:cn - geoip:cn), returning only expected IPs 的本地化字符串。
/// 查找类似 When configured, validates IPs returned for regional domains (e.g., geosite:cn), returning only expected IPs 的本地化字符串。
/// </summary>
public static string TbValidateDirectExpectedIPsDesc {
get {

View file

@ -1419,11 +1419,14 @@
<data name="TbDomesticDNS" xml:space="preserve">
<value>Domestic DNS</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>Via proxy — please ensure remote availability</value>
</data>
<data name="TbDirectResolveStrategy" xml:space="preserve">
<value>Direct Target Resolution Strategy</value>
<value>Direct Resolution Strategy</value>
</data>
<data name="TbRemoteResolveStrategy" xml:space="preserve">
<value>Proxy Target Resolution Strategy</value>
<value>Remote Resolution Strategy</value>
</data>
<data name="TbAddCommonDNSHosts" xml:space="preserve">
<value>Add Common DNS Hosts</value>
@ -1447,7 +1450,7 @@
<value>Validate Regional Domain IPs</value>
</data>
<data name="TbValidateDirectExpectedIPsDesc" xml:space="preserve">
<value>When configured, validates IPs returned for regional domains (e.g., geosite:cn - geoip:cn), returning only expected IPs</value>
<value>When configured, validates IPs returned for regional domains (e.g., geosite:cn), returning only expected IPs</value>
</data>
<data name="TbCustomDNSEnable" xml:space="preserve">
<value>Enable Custom DNS</value>
@ -1653,16 +1656,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
<data name="TbParallelQuery" xml:space="preserve">
<value>Parallel Query</value>
</data>
<data name="TbDomesticDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution; ensure the remote server can reach this DNS</value>
</data>
<data name="TbDirectResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution uses the system DNS; otherwise, the internal DNS module is used.</value>
</data>
<data name="TbRemoteResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution is performed by the remote server's DNS; otherwise, the internal DNS module is used.</value>
</data>
</root>

View file

@ -1416,11 +1416,14 @@
<data name="TbDomesticDNS" xml:space="preserve">
<value>DNS direct</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>Via le proxy ; assurez-vous que le serveur distant est disponible</value>
</data>
<data name="TbDirectResolveStrategy" xml:space="preserve">
<value>Direct Target Resolution Strategy</value>
<value>Stratégie de résolution directe</value>
</data>
<data name="TbRemoteResolveStrategy" xml:space="preserve">
<value>Proxy Target Resolution Strategy</value>
<value>Stratégie de résolution distante</value>
</data>
<data name="TbAddCommonDNSHosts" xml:space="preserve">
<value>Ajouter des hôtes DNS courants</value>
@ -1444,7 +1447,7 @@
<value>Valider les IP des domaines de la région concernée</value>
</data>
<data name="TbValidateDirectExpectedIPsDesc" xml:space="preserve">
<value>Après config, les IP renvoyées des domaines régionaux (ex. geosite:cn - geoip:cn) seront vérifiées ; seules les IP attendues seront retournées.</value>
<value>Après config, les IP renvoyées des domaines régionaux (ex. geosite:cn) seront vérifiées ; seules les IP attendues seront retournées.</value>
</data>
<data name="TbCustomDNSEnable" xml:space="preserve">
<value>Activer le DNS personnalisé</value>
@ -1650,16 +1653,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
<data name="TbParallelQuery" xml:space="preserve">
<value>Parallel Query</value>
</data>
<data name="TbDomesticDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution; ensure the remote server can reach this DNS</value>
</data>
<data name="TbDirectResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution uses the system DNS; otherwise, the internal DNS module is used.</value>
</data>
<data name="TbRemoteResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution is performed by the remote server's DNS; otherwise, the internal DNS module is used.</value>
</data>
</root>

View file

@ -1419,11 +1419,14 @@
<data name="TbDomesticDNS" xml:space="preserve">
<value>Domestic DNS</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>Via proxy — please ensure remote availability</value>
</data>
<data name="TbDirectResolveStrategy" xml:space="preserve">
<value>Direct Target Resolution Strategy</value>
<value>Direct Resolution Strategy</value>
</data>
<data name="TbRemoteResolveStrategy" xml:space="preserve">
<value>Proxy Target Resolution Strategy</value>
<value>Remote Resolution Strategy</value>
</data>
<data name="TbAddCommonDNSHosts" xml:space="preserve">
<value>Add Common DNS Hosts</value>
@ -1447,7 +1450,7 @@
<value>Validate Regional Domain IPs</value>
</data>
<data name="TbValidateDirectExpectedIPsDesc" xml:space="preserve">
<value>When configured, validates IPs returned for regional domains (e.g., geosite:cn - geoip:cn), returning only expected IPs</value>
<value>When configured, validates IPs returned for regional domains (e.g., geosite:cn), returning only expected IPs</value>
</data>
<data name="TbCustomDNSEnable" xml:space="preserve">
<value>Enable Custom DNS</value>
@ -1653,16 +1656,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
<data name="TbParallelQuery" xml:space="preserve">
<value>Parallel Query</value>
</data>
<data name="TbDomesticDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution; ensure the remote server can reach this DNS</value>
</data>
<data name="TbDirectResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution uses the system DNS; otherwise, the internal DNS module is used.</value>
</data>
<data name="TbRemoteResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution is performed by the remote server's DNS; otherwise, the internal DNS module is used.</value>
</data>
</root>

View file

@ -1419,11 +1419,14 @@
<data name="TbDomesticDNS" xml:space="preserve">
<value>Domestic DNS</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>Via proxy — please ensure remote availability</value>
</data>
<data name="TbDirectResolveStrategy" xml:space="preserve">
<value>Direct Target Resolution Strategy</value>
<value>Direct Resolution Strategy</value>
</data>
<data name="TbRemoteResolveStrategy" xml:space="preserve">
<value>Proxy Target Resolution Strategy</value>
<value>Remote Resolution Strategy</value>
</data>
<data name="TbAddCommonDNSHosts" xml:space="preserve">
<value>Add Common DNS Hosts</value>
@ -1447,7 +1450,7 @@
<value>Validate Regional Domain IPs</value>
</data>
<data name="TbValidateDirectExpectedIPsDesc" xml:space="preserve">
<value>When configured, validates IPs returned for regional domains (e.g., geosite:cn - geoip:cn), returning only expected IPs</value>
<value>When configured, validates IPs returned for regional domains (e.g., geosite:cn), returning only expected IPs</value>
</data>
<data name="TbCustomDNSEnable" xml:space="preserve">
<value>Enable Custom DNS</value>
@ -1653,16 +1656,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
<data name="TbParallelQuery" xml:space="preserve">
<value>Parallel Query</value>
</data>
<data name="TbDomesticDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution; ensure the remote server can reach this DNS</value>
</data>
<data name="TbDirectResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution uses the system DNS; otherwise, the internal DNS module is used.</value>
</data>
<data name="TbRemoteResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution is performed by the remote server's DNS; otherwise, the internal DNS module is used.</value>
</data>
</root>

View file

@ -1419,11 +1419,14 @@
<data name="TbDomesticDNS" xml:space="preserve">
<value>Внутренний DNS</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>Via proxy — please ensure remote availability</value>
</data>
<data name="TbDirectResolveStrategy" xml:space="preserve">
<value>Direct Target Resolution Strategy</value>
<value>Стратегия прямого резолвинга</value>
</data>
<data name="TbRemoteResolveStrategy" xml:space="preserve">
<value>Proxy Target Resolution Strategy</value>
<value>Стратегия удалённого резолвинга</value>
</data>
<data name="TbAddCommonDNSHosts" xml:space="preserve">
<value>Добавить стандартные записи hosts (DNS)</value>
@ -1447,7 +1450,7 @@
<value>Проверять IP-адреса региональных доменов</value>
</data>
<data name="TbValidateDirectExpectedIPsDesc" xml:space="preserve">
<value>При включении проверяет IP-адреса, возвращаемые для региональных доменов (например, geosite:cn - geoip:cn), и оставляет только ожидаемые IP-адреса</value>
<value>При включении проверяет IP-адреса, возвращаемые для региональных доменов (например, geosite:cn), и оставляет только ожидаемые IP-адреса</value>
</data>
<data name="TbCustomDNSEnable" xml:space="preserve">
<value>Включить пользовательский DNS</value>
@ -1653,16 +1656,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
<data name="TbParallelQuery" xml:space="preserve">
<value>Parallel Query</value>
</data>
<data name="TbDomesticDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution; ensure the remote server can reach this DNS</value>
</data>
<data name="TbDirectResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution uses the system DNS; otherwise, the internal DNS module is used.</value>
</data>
<data name="TbRemoteResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution is performed by the remote server's DNS; otherwise, the internal DNS module is used.</value>
</data>
</root>

View file

@ -1416,11 +1416,14 @@
<data name="TbDomesticDNS" xml:space="preserve">
<value>直连 DNS</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>通过代理,请确保远程可用</value>
</data>
<data name="TbDirectResolveStrategy" xml:space="preserve">
<value>直连目标解析策略</value>
<value>直连解析策略</value>
</data>
<data name="TbRemoteResolveStrategy" xml:space="preserve">
<value>代理目标解析策略</value>
<value>远程解析策略</value>
</data>
<data name="TbAddCommonDNSHosts" xml:space="preserve">
<value>添加常用 DNS Hosts</value>
@ -1444,7 +1447,7 @@
<value>校验相应地区域名 IP</value>
</data>
<data name="TbValidateDirectExpectedIPsDesc" xml:space="preserve">
<value>配置后,会对相应地区域名(如 geosite:cn - geoip:cn)的返回 IP 进行校验,仅返回期望 IP</value>
<value>配置后,会对相应地区域名(如 geosite:cn的返回 IP 进行校验,仅返回期望 IP</value>
</data>
<data name="TbCustomDNSEnable" xml:space="preserve">
<value>启用自定义 DNS</value>
@ -1650,16 +1653,4 @@
<data name="TbParallelQuery" xml:space="preserve">
<value>并行查询</value>
</data>
<data name="TbDomesticDNSTips" xml:space="preserve">
<value>默认仅在路由阶段被调用解析</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>默认仅在路由阶段被调用解析;请确保远程服务器可访问该 DNS</value>
</data>
<data name="TbDirectResolveStrategyTips" xml:space="preserve">
<value>当未选择或 "AsIs" 时,使用系统 DNS 进行解析;否则,使用内部 DNS 模块解析。</value>
</data>
<data name="TbRemoteResolveStrategyTips" xml:space="preserve">
<value>当未选择或 "AsIs" 时,由远程服务器端 DNS 解析;否则,使用内部 DNS 模块解析。</value>
</data>
</root>

View file

@ -1416,11 +1416,14 @@
<data name="TbDomesticDNS" xml:space="preserve">
<value>直連 DNS</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>通过代理,请确保远程可用</value>
</data>
<data name="TbDirectResolveStrategy" xml:space="preserve">
<value>直連目標解析策略</value>
<value>直連解析策略</value>
</data>
<data name="TbRemoteResolveStrategy" xml:space="preserve">
<value>代理目標解析策略</value>
<value>遠程解析策略</value>
</data>
<data name="TbAddCommonDNSHosts" xml:space="preserve">
<value>新增常用 DNS Hosts</value>
@ -1444,7 +1447,7 @@
<value>校驗相應地區域名 IP</value>
</data>
<data name="TbValidateDirectExpectedIPsDesc" xml:space="preserve">
<value>配置後,會對相應地區域名(如 geosite:cn - geoip:cn)的返回 IP 進行校驗,僅返回期望 IP</value>
<value>配置後,會對相應地區域名(如 geosite:cn的返回 IP 進行校驗,僅返回期望 IP</value>
</data>
<data name="TbCustomDNSEnable" xml:space="preserve">
<value>啟用自訂 DNS</value>
@ -1650,16 +1653,4 @@
<data name="TbParallelQuery" xml:space="preserve">
<value>Parallel Query</value>
</data>
<data name="TbDomesticDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution</value>
</data>
<data name="TbRemoteDNSTips" xml:space="preserve">
<value>By default, invoked only during routing for resolution; ensure the remote server can reach this DNS</value>
</data>
<data name="TbDirectResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution uses the system DNS; otherwise, the internal DNS module is used.</value>
</data>
<data name="TbRemoteResolveStrategyTips" xml:space="preserve">
<value>If unset or "AsIs", DNS resolution is performed by the remote server's DNS; otherwise, the internal DNS module is used.</value>
</data>
</root>

View file

@ -280,9 +280,7 @@ public partial class CoreConfigSingboxService
if (_config.TunModeItem.EnableTun && item.Process?.Count > 0)
{
var ruleProcName = JsonUtils.DeepCopy(rule3);
ruleProcName.process_name ??= [];
var ruleProcPath = JsonUtils.DeepCopy(rule3);
ruleProcPath.process_path ??= [];
foreach (var process in item.Process)
{
// sing-box doesn't support this, fall back to process name match

View file

@ -325,7 +325,6 @@ public partial class CoreConfigV2rayService
else if (!node.CertSha.IsNullOrEmpty())
{
tlsSettings.pinnedPeerCertSha256 = node.CertSha;
tlsSettings.allowInsecure = false;
}
streamSettings.tlsSettings = tlsSettings;
}
@ -365,33 +364,14 @@ public partial class CoreConfigV2rayService
kcpSettings.congestion = _config.KcpItem.Congestion;
kcpSettings.readBufferSize = _config.KcpItem.ReadBufferSize;
kcpSettings.writeBufferSize = _config.KcpItem.WriteBufferSize;
streamSettings.finalmask ??= new();
if (Global.KcpHeaderMaskMap.TryGetValue(node.HeaderType, out var header))
kcpSettings.header = new Header4Ray
{
streamSettings.finalmask.udp =
[
new Mask4Ray
{
type = header,
settings = node.HeaderType == "dns" && !host.IsNullOrEmpty() ? new MaskSettings4Ray { domain = host } : null
}
];
}
streamSettings.finalmask.udp ??= [];
if (path.IsNullOrEmpty())
type = node.HeaderType,
domain = host.NullIfEmpty()
};
if (path.IsNotEmpty())
{
streamSettings.finalmask.udp.Add(new Mask4Ray
{
type = "mkcp-original"
});
}
else
{
streamSettings.finalmask.udp.Add(new Mask4Ray
{
type = "mkcp-aes128gcm",
settings = new MaskSettings4Ray { password = path }
});
kcpSettings.seed = path;
}
streamSettings.kcpSettings = kcpSettings;
break;
@ -532,15 +512,8 @@ public partial class CoreConfigV2rayService
streamSettings.hysteriaSettings = hysteriaSettings;
if (node.Path.IsNotEmpty())
{
streamSettings.finalmask ??= new();
streamSettings.finalmask.udp =
[
new Mask4Ray
{
type = "salamander",
settings = new MaskSettings4Ray { password = node.Path.TrimEx(), }
}
];
streamSettings.udpmasks =
[new() { type = "salamander", settings = new() { password = node.Path.TrimEx(), } }];
}
break;

View file

@ -61,15 +61,7 @@
Grid.Column="1"
Width="300"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
IsEditable="True" />
<TextBlock
Grid.Row="1"
Grid.Column="2"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbDomesticDNSTips}"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="2"
@ -83,7 +75,6 @@
Grid.Column="1"
Width="300"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
IsEditable="True" />
<TextBlock
Grid.Row="2"
@ -92,7 +83,7 @@
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbRemoteDNSTips}"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="3"
Grid.Column="0"
@ -105,7 +96,6 @@
Grid.Column="1"
Width="300"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
IsEditable="True" />
<TextBlock
Grid.Row="3"
@ -127,15 +117,7 @@
Grid.Column="1"
Width="200"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
PlaceholderText="Default" />
<TextBlock
Grid.Row="5"
Grid.Column="2"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbDirectResolveStrategyTips}"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="6"
@ -149,16 +131,8 @@
Grid.Column="1"
Width="200"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
PlaceholderText="Default" />
<TextBlock
Grid.Row="6"
Grid.Column="2"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbRemoteResolveStrategyTips}"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="7"
Grid.Column="0"
@ -170,9 +144,8 @@
Grid.Row="7"
Grid.Column="1"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
VerticalAlignment="Center" />
HorizontalAlignment="Left" />
<TextBlock
Grid.Row="8"
Grid.Column="0"
@ -184,8 +157,7 @@
Grid.Row="8"
Grid.Column="1"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
VerticalAlignment="Center" />
HorizontalAlignment="Left" />
</Grid>
</ScrollViewer>
</TabItem>
@ -217,8 +189,7 @@
Grid.Row="1"
Grid.Column="1"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
VerticalAlignment="Center" />
HorizontalAlignment="Left" />
<TextBlock
Grid.Row="2"
@ -231,8 +202,7 @@
Grid.Row="2"
Grid.Column="1"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
VerticalAlignment="Center" />
HorizontalAlignment="Left" />
<TextBlock
Grid.Row="3"
@ -245,8 +215,7 @@
Grid.Row="3"
Grid.Column="1"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
VerticalAlignment="Center" />
HorizontalAlignment="Left" />
<TextBlock
Grid.Row="3"
Grid.Column="2"
@ -266,8 +235,7 @@
Grid.Row="4"
Grid.Column="1"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
VerticalAlignment="Center" />
HorizontalAlignment="Left" />
<TextBlock
Grid.Row="4"
Grid.Column="2"
@ -288,7 +256,6 @@
Grid.Column="1"
Width="200"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
IsEditable="True" />
<TextBlock
Grid.Row="5"

View file

@ -84,14 +84,6 @@
Margin="{StaticResource Margin8}"
IsEditable="True"
Style="{StaticResource DefComboBox}" />
<TextBlock
Grid.Row="1"
Grid.Column="2"
Margin="{StaticResource Margin8}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbDomesticDNSTips}"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="2"
@ -156,14 +148,6 @@
Margin="{StaticResource Margin8}"
materialDesign:HintAssist.Hint="Default"
Style="{StaticResource DefComboBox}" />
<TextBlock
Grid.Row="5"
Grid.Column="2"
Margin="{StaticResource Margin8}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbDirectResolveStrategyTips}"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="6"
@ -180,14 +164,6 @@
Margin="{StaticResource Margin8}"
materialDesign:HintAssist.Hint="Default"
Style="{StaticResource DefComboBox}" />
<TextBlock
Grid.Row="6"
Grid.Column="2"
Margin="{StaticResource Margin8}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbRemoteResolveStrategyTips}"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="7"