diff --git a/db/ConfigBuilder.cpp b/db/ConfigBuilder.cpp index 3037594..655c7d5 100644 --- a/db/ConfigBuilder.cpp +++ b/db/ConfigBuilder.cpp @@ -607,8 +607,16 @@ namespace NekoRay { } // Bypass Lookup for the first profile - if (isFirstProfile && !IsIpAddress(ent->bean->serverAddress)) { - status->domainListDNSDirect += "full:" + ent->bean->serverAddress; + auto serverAddress = ent->bean->serverAddress; + + auto customBean = dynamic_cast(ent->bean.get()); + if (customBean != nullptr && customBean->core == "internal") { + auto server = QString2QJsonObject(customBean->config_simple)["server"].toString(); + if (!server.isEmpty()) serverAddress = server; + } + + if (isFirstProfile && !IsIpAddress(serverAddress)) { + status->domainListDNSDirect += "full:" + serverAddress; } status->outbounds += outbound; @@ -713,15 +721,15 @@ namespace NekoRay { if (item.startsWith("geosite:")) { geosite += item.replace("geosite:", ""); } else if (item.startsWith("full:")) { - domain_full += item.replace("full:", ""); + domain_full += item.replace("full:", "").toLower(); } else if (item.startsWith("domain:")) { - domain_subdomain += item.replace("domain:", ""); + domain_subdomain += item.replace("domain:", "").toLower(); } else if (item.startsWith("regexp:")) { - domain_regexp += item.replace("regexp:", ""); + domain_regexp += item.replace("regexp:", "").toLower(); } else if (item.startsWith("keyword:")) { - domain_keyword += item.replace("keyword:", ""); + domain_keyword += item.replace("keyword:", "").toLower(); } else { - domain_full += item; + domain_full += item.toLower(); } } } @@ -751,7 +759,7 @@ namespace NekoRay { if (!status->forTest) dnsServers += QJsonObject{ {"tag", "dns-remote"}, - {"address_resolver", "dns-underlying"}, + {"address_resolver", "dns-local"}, {"strategy", dataStore->remote_dns_strategy}, {"address", dataStore->remote_dns}, {"detour", tagProxy}, @@ -766,7 +774,7 @@ namespace NekoRay { if (!status->forTest) dnsServers += QJsonObject{ {"tag", "dns-direct"}, - {"address_resolver", "dns-underlying"}, + {"address_resolver", "dns-local"}, {"strategy", dataStore->direct_dns_strategy}, {"address", directDNSAddress.replace("+local://", "://")}, {"detour", "direct"}, @@ -774,7 +782,7 @@ namespace NekoRay { // Underlying 100% Working DNS dnsServers += QJsonObject{ - {"tag", "dns-underlying"}, + {"tag", "dns-local"}, {"address", underlyingStr}, {"detour", "direct"}, }; diff --git a/libs/build_public_res.sh b/libs/build_public_res.sh index 49943fb..26edc0d 100755 --- a/libs/build_public_res.sh +++ b/libs/build_public_res.sh @@ -7,10 +7,10 @@ rm -rf $DEST mkdir -p $DEST #### Download geodata #### -curl -Lso $DEST/geoip.dat "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" -curl -Lso $DEST/geosite.dat "https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat" -curl -Lso $DEST/geoip.db "https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db" -curl -Lso $DEST/geosite.db "https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db" +curl -fLso $DEST/geoip.dat "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" +curl -fLso $DEST/geosite.dat "https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat" +curl -fLso $DEST/geoip.db "https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db" +curl -fLso $DEST/geosite.db "https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db" #### copy res/public #### cp res/public/* $DEST diff --git a/ui/dialog_manage_routes.ui b/ui/dialog_manage_routes.ui index 7ca7dfd..f3282f5 100644 --- a/ui/dialog_manage_routes.ui +++ b/ui/dialog_manage_routes.ui @@ -102,6 +102,26 @@ + + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + Enable DNS Routing + + + @@ -113,7 +133,7 @@ - + 0 @@ -126,26 +146,6 @@ 0 - - - - - 0 - 0 - - - - Enable DNS Routing - - - - - - - Qt::Vertical - - - @@ -465,6 +465,7 @@ dns_remote dns_direct dns_routing + queryStrategy domainStrategyCombo domainMatcherCombo preset