diff --git a/db/ConfigBuilder.cpp b/db/ConfigBuilder.cpp index af22737..eaa5741 100644 --- a/db/ConfigBuilder.cpp +++ b/db/ConfigBuilder.cpp @@ -328,7 +328,7 @@ namespace NekoGui { {"queryStrategy", dataStore->routing->direct_dns_strategy}, {"domains", QList2QJsonArray(status->domainListDNSDirect)}, }; - if (dataStore->routing->def_outbound == "bypass") { + if (dataStore->routing->dns_final_out == "bypass") { dnsServers.prepend(directObj); } else { dnsServers.append(directObj); @@ -867,7 +867,7 @@ namespace NekoGui { {"address", directDNSAddress.replace("+local://", "://")}, {"detour", "direct"}, }; - if (dataStore->routing->def_outbound == "bypass") { + if (dataStore->routing->dns_final_out == "bypass") { dnsServers.prepend(directObj); } else { dnsServers.append(directObj); diff --git a/db/Database.cpp b/db/Database.cpp index 0ff3f3c..d99741f 100644 --- a/db/Database.cpp +++ b/db/Database.cpp @@ -186,7 +186,7 @@ namespace NekoGui { bean = new NekoGui_fmt::NaiveBean(); } else if (type == "hysteria") { bean = new NekoGui_fmt::QUICBean(NekoGui_fmt::QUICBean::proxy_Hysteria); - } else if (type == "hysteria2" ) { + } else if (type == "hysteria2") { bean = new NekoGui_fmt::QUICBean(NekoGui_fmt::QUICBean::proxy_Hysteria2); } else if (type == "tuic") { bean = new NekoGui_fmt::QUICBean(NekoGui_fmt::QUICBean::proxy_TUIC); diff --git a/main/NekoGui_DataStore.hpp b/main/NekoGui_DataStore.hpp index 0530042..189e4d8 100644 --- a/main/NekoGui_DataStore.hpp +++ b/main/NekoGui_DataStore.hpp @@ -21,6 +21,7 @@ namespace NekoGui { bool dns_routing = true; bool use_dns_object = false; QString dns_object = ""; + QString dns_final_out = "proxy"; // Misc QString domain_strategy = "AsIs"; diff --git a/translations/fa_IR.ts b/translations/fa_IR.ts index f69dc07..cc93287 100644 --- a/translations/fa_IR.ts +++ b/translations/fa_IR.ts @@ -721,6 +721,10 @@ If the default value does not work, try changing it to "223.5.5.5". For more information, see the document "Configuration/DNS". + + Final DNS Out + + DialogVPNSettings diff --git a/translations/ru_RU.ts b/translations/ru_RU.ts index 9703972..4eeaff3 100644 --- a/translations/ru_RU.ts +++ b/translations/ru_RU.ts @@ -724,6 +724,10 @@ If the default value does not work, try changing it to "223.5.5.5". For more information, see the document "Configuration/DNS". + + Final DNS Out + + DialogVPNSettings diff --git a/translations/zh_CN.ts b/translations/zh_CN.ts index 3417563..147e5f6 100644 --- a/translations/zh_CN.ts +++ b/translations/zh_CN.ts @@ -725,6 +725,10 @@ For more information, see the document "Configuration/DNS". 如果默认值不工作,可以尝试更改为 "223.5.5.5"。 更多信息,请参阅文档 "配置/DNS"。 + + Final DNS Out + 默认 DNS 出站 + DialogVPNSettings diff --git a/ui/dialog_manage_routes.cpp b/ui/dialog_manage_routes.cpp index 7d4d7c0..f35cc2e 100644 --- a/ui/dialog_manage_routes.cpp +++ b/ui/dialog_manage_routes.cpp @@ -154,6 +154,7 @@ void DialogManageRoutes::UpdateDisplayRouting(NekoGui::Routing *conf, bool qv) { ui->remote_dns_strategy->setCurrentText(conf->remote_dns_strategy); ui->direct_dns->setCurrentText(conf->direct_dns); ui->direct_dns_strategy->setCurrentText(conf->direct_dns_strategy); + ui->dns_final_out->setCurrentText(conf->dns_final_out); } void DialogManageRoutes::SaveDisplayRouting(NekoGui::Routing *conf) { @@ -176,6 +177,7 @@ void DialogManageRoutes::SaveDisplayRouting(NekoGui::Routing *conf) { conf->remote_dns_strategy = ui->remote_dns_strategy->currentText(); conf->direct_dns = ui->direct_dns->currentText(); conf->direct_dns_strategy = ui->direct_dns_strategy->currentText(); + conf->dns_final_out = ui->dns_final_out->currentText(); } void DialogManageRoutes::on_load_save_clicked() { diff --git a/ui/dialog_manage_routes.ui b/ui/dialog_manage_routes.ui index 4f415ad..1f2bdbe 100644 --- a/ui/dialog_manage_routes.ui +++ b/ui/dialog_manage_routes.ui @@ -250,6 +250,40 @@ For more information, see the document "Configuration/DNS". + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Final DNS Out + + + + + + + + proxy + + + + + bypass + + + + @@ -601,6 +635,7 @@ For more information, see the document "Configuration/DNS". direct_dns direct_dns_strategy dns_routing + dns_final_out use_dns_object format_dns_object dns_document