mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +03:00
feat: choose final DNS out (#872)
This commit is contained in:
committed by
GitHub
parent
39288bd804
commit
65259e6097
@@ -328,7 +328,7 @@ namespace NekoGui {
|
||||
{"queryStrategy", dataStore->routing->direct_dns_strategy},
|
||||
{"domains", QList2QJsonArray<QString>(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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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".</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Final DNS Out</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogVPNSettings</name>
|
||||
|
||||
@@ -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".</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Final DNS Out</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogVPNSettings</name>
|
||||
|
||||
@@ -725,6 +725,10 @@ For more information, see the document "Configuration/DNS".</source>
|
||||
如果默认值不工作,可以尝试更改为 "223.5.5.5"。
|
||||
更多信息,请参阅文档 "配置/DNS"。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Final DNS Out</source>
|
||||
<translation>默认 DNS 出站</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogVPNSettings</name>
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -250,6 +250,40 @@ For more information, see the document "Configuration/DNS".</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="dns_final_out_l">
|
||||
<property name="text">
|
||||
<string>Final DNS Out</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="dns_final_out">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">proxy</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">bypass</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
@@ -601,6 +635,7 @@ For more information, see the document "Configuration/DNS".</string>
|
||||
<tabstop>direct_dns</tabstop>
|
||||
<tabstop>direct_dns_strategy</tabstop>
|
||||
<tabstop>dns_routing</tabstop>
|
||||
<tabstop>dns_final_out</tabstop>
|
||||
<tabstop>use_dns_object</tabstop>
|
||||
<tabstop>format_dns_object</tabstop>
|
||||
<tabstop>dns_document</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user