feat: 支持更多的 DNS 配置选项

This commit is contained in:
Chenx Dust
2026-08-25 02:38:55 +08:00
parent f433d0a34c
commit 94a4f9e70a
8 changed files with 73 additions and 12 deletions

View File

@@ -171,13 +171,15 @@ CoreCommand CoreCommandBuilder::build(const ConnectionProfile &profile, const Co
if (!profile.dns.primary.isEmpty() || profile.dns.automatic)
{
arguments << "-zju-dns-server" << (profile.dns.automatic ? "auto" : profile.dns.primary);
arguments << "-remote-dns-server" << (profile.dns.automatic ? "auto" : profile.dns.primary);
}
if (profile.dns.ttl != 3600)
{
arguments << "-dns-ttl" << QString::number(profile.dns.ttl);
}
appendOption(arguments, "-secondary-dns-server", profile.dns.secondary);
appendOption(arguments, "-local-dns-server", profile.dns.localDnsServer);
appendOption(arguments, "-dns-server-bind", profile.dns.dnsServerBind);
if (profile.behavior.disableKeepAlive)
{
@@ -191,7 +193,7 @@ CoreCommand CoreCommandBuilder::build(const ConnectionProfile &profile, const Co
}
if (profile.dns.disableZjuDns)
{
arguments << "-disable-zju-dns";
arguments << "-disable-remote-dns";
}
if (profile.behavior.disableServerConfig)
{