TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.83k stars 399 forks source link

Problems with AdvancedForwarding.App(2) #861

Closed Potterli20 closed 3 months ago

Potterli20 commented 4 months ago

{ "enableForwarding": true, "proxyServers": [ { "name": "local-proxy", "type": "http", "proxyAddress": "localhost", "proxyPort": 1080, "proxyUsername": null, "proxyPassword": null } ], "forwarders": [ { "name": "dns-https", "proxy": local-proxy, "dnssecValidation": true, "forwarderProtocol": "Https", "forwarderAddresses": [ "https://dns.quad9.net/dns-query", "https://dns.google/dns-query" ] }, { "name": "dns-tls", "proxy": local-proxy, "dnssecValidation": true, "forwarderProtocol": "tls", "forwarderAddresses": [ "tls://dns.quad9.net", "tls://dns.google" ] }, { "name": "dns-quic", "proxy": local-proxy, "dnssecValidation": true, "forwarderProtocol": "quic", "forwarderAddresses": [ "quic://dns.quad9.net", "quic://dns.google" ] }, { "name": "dns-h3", "proxy": local-proxy, "dnssecValidation": true, "forwarderProtocol": "h3", "forwarderAddresses": [ "h3://dns.quad9.net/dns-query", "h3://dns.google/dns-query" ] }, { "name": "dns-cn-https", "dnssecValidation": true, "forwarderProtocol": "https", "forwarderAddresses": [ "https://dns.alidns.com/dns-query", "https://dns.pub/dns-query" ] }, { "name": "dns-cn-quic", "dnssecValidation": true, "forwarderProtocol": "quic", "forwarderAddresses": [ "quic://dns.alidns.com" ] }, { "name": "dns-cn-tls", "dnssecValidation": true, "forwarderProtocol": "tls", "forwarderAddresses": [ "tls://dns.alidns.com", "tls://dot.pub" ] }, { "name": "dns-cn-h3", "dnssecValidation": true, "forwarderProtocol": "quic", "forwarderAddresses": [ "h3://dns.alidns.com/dns-query" ] }, ], "networkGroupMap": { "0.0.0.0/0": "everyone", "[::]/0": "everyone" }, "groups": [ { "name": "everyone", "enableForwarding": true, "forwardings": [ { "forwarders": [ "dns-xxx" ], "domainsFile": "domains-File.txt" }, { "forwarders": [ { "forwarders": [ "dns-cn-xxx" ], "domainsFile": "domains-File.txt" }, ], "adguardUpstreams": [ { "proxy": null, "dnssecValidation": true, "configFile": "adguard-upstreams.txt" } ] } ] }

Potterli20 commented 4 months ago

Can I add this domainsFile?

Potterli20 commented 4 months ago

It is also OK if the forwarderAddresses are also made into forwarderAddressesFile.

ShreyasZare commented 4 months ago

Thanks for the post. If you wish to use files then you can look at using the adguard file format which should work for your requirement. Does that work for you?

Adding more file options may not use useful since these files are not manageable via the web GUI and requires user to login to the server to update it.

Potterli20 commented 4 months ago

Thanks for the post. If you wish to use files then you can look at using the adguard file format which should work for your requirement. Does that work for you?

Adding more file options may not use useful since these files are not manageable via the web GUI and requires user to login to the server to update it.

Because I am in China, some overseas dns servers in China are not used, but I can rely on proxies.

adguardUpstreams is OK, but dns outside our Chinese part is not

ShreyasZare commented 4 months ago

Because I am in China, some overseas dns servers in China are not used, but I can rely on proxies.

Proxy is supported with adguard file option too. It will work same like the other forwarding option.

Potterli20 commented 4 months ago

Proxy is supported with adguard file option too. It will work same like the other forwarding option.

The adguard file option is global, the dns cannot be requested separately and the proxy is also global

Potterli20 commented 4 months ago

https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#examples

图片 Excuse me. Do you support this now?

ShreyasZare commented 4 months ago

Excuse me. Do you support this now?

Yes, its supported. Take a look at the example adguard file that is included with the app.

Potterli20 commented 4 months ago

Yes, its supported. Take a look at the example adguard file that is included with the app.

It seems that [/host.com/example.com/]tls://1.1.1.1 https://1.1.1.1/dns-query is not on your list

Potterli20 commented 4 months ago

Or you can add the redis interface https://github.com/TechnitiumSoftware/DnsServer/issues/862

ShreyasZare commented 4 months ago

Yes, its supported. Take a look at the example adguard file that is included with the app.

It seems that [/host.com/example.com/]tls://1.1.1.1 https://1.1.1.1/dns-query is not on your list

Ohh yes. I missed read the earlier comment. Will get the app updated to support this.

ShreyasZare commented 4 months ago

Or you can add the redis interface #862

I did not understand the reference. Please explain it in details.

Potterli20 commented 4 months ago

Or you can add the redis interface #862

I did not understand the reference. Please explain it in details.

{ "enableForwarding": true, "proxyServers": [ { "name": "local-proxy", "type": "http", "proxyAddress": "localhost", "proxyPort": 1080, "proxyUsername": null, "proxyPassword": null } ], "forwarders": [ { "name": "dns-https", "proxy": local-proxy, "redis": "127.0.0.1:6781", "dnssecValidation": true, "forwarderProtocol": "Https", "forwarderAddresses": [ "https://dns.quad9.net/dns-query", "https://dns.google/dns-query" ] }, { "name": "dns-tls", "proxy": local-proxy, "redis": "127.0.0.1:6781", "dnssecValidation": true, "forwarderProtocol": "tls", "forwarderAddresses": [ "tls://dns.quad9.net", "tls://dns.google" ] }, { "name": "dns-quic", "proxy": local-proxy, "dnssecValidation": true, "forwarderProtocol": "quic", "forwarderAddresses": [ "quic://dns.quad9.net", "quic://dns.google" ] }, { "name": "dns-h3", "proxy": local-proxy, "dnssecValidation": true, "forwarderProtocol": "h3", "forwarderAddresses": [ "h3://dns.quad9.net/dns-query", "h3://dns.google/dns-query" ] }, { "name": "dns-cn-https", "dnssecValidation": true, "forwarderProtocol": "https", "forwarderAddresses": [ "https://dns.alidns.com/dns-query", "https://dns.pub/dns-query" ] }, { "name": "dns-cn-quic", "dnssecValidation": true, "redis": null, "forwarderProtocol": "quic", "forwarderAddresses": [ "quic://dns.alidns.com" ] }, { "name": "dns-cn-tls", "dnssecValidation": true, "forwarderProtocol": "tls", "forwarderAddresses": [ "tls://dns.alidns.com", "tls://dot.pub" ] }, { "name": "dns-cn-h3", "dnssecValidation": true, "forwarderProtocol": "quic", "forwarderAddresses": [ "h3://dns.alidns.com/dns-query" ] }, ], "networkGroupMap": { "0.0.0.0/0": "everyone", "[::]/0": "everyone" }, "groups": [ { "name": "everyone", "enableForwarding": true, "forwardings": [ { "forwarders": [ "dns-xxx" ], "domainsFile": "domains-File.txt" }, { "forwarders": [ { "forwarders": [ "dns-cn-xxx" ], "domainsFile": "domains-File.txt" }, ], "adguardUpstreams": [ { "proxy": null, "redis": "127.0.0.1:6781", "dnssecValidation": true, "configFile": "adguard-upstreams.txt" } ] } ] }

Potterli20 commented 4 months ago

Or you can add the redis interface #862

I did not understand the reference. Please explain it in details.

{ "enableForwarding": true, "proxyServers": [ { "name": "local-proxy", "type": "http", "proxyAddress": "localhost", "proxyPort": 1080, "proxyUsername": null, "proxyPassword": null } ], "forwarders": [ { "name": "dns-https", "proxy": local-proxy, "redis": "127.0.0.1:6781", "dnssecValidation": true, "forwarderProtocol": "Https", "forwarderAddresses": [ "https://dns.quad9.net/dns-query", "https://dns.google/dns-query" ] }, { "name": "dns-tls", "proxy": local-proxy, "redis": "127.0.0.1:6781", "dnssecValidation": true, "forwarderProtocol": "tls", "forwarderAddresses": [ "tls://dns.quad9.net", "tls://dns.google" ] }, { "name": "dns-quic", "proxy": local-proxy, "dnssecValidation": true, "forwarderProtocol": "quic", "forwarderAddresses": [ "quic://dns.quad9.net", "quic://dns.google" ] }, { "name": "dns-h3", "proxy": local-proxy, "dnssecValidation": true, "forwarderProtocol": "h3", "forwarderAddresses": [ "h3://dns.quad9.net/dns-query", "h3://dns.google/dns-query" ] }, { "name": "dns-cn-https", "dnssecValidation": true, "forwarderProtocol": "https", "forwarderAddresses": [ "https://dns.alidns.com/dns-query", "https://dns.pub/dns-query" ] }, { "name": "dns-cn-quic", "dnssecValidation": true, "redis": null, "forwarderProtocol": "quic", "forwarderAddresses": [ "quic://dns.alidns.com" ] }, { "name": "dns-cn-tls", "dnssecValidation": true, "forwarderProtocol": "tls", "forwarderAddresses": [ "tls://dns.alidns.com", "tls://dot.pub" ] }, { "name": "dns-cn-h3", "dnssecValidation": true, "forwarderProtocol": "quic", "forwarderAddresses": [ "h3://dns.alidns.com/dns-query" ] }, ], "networkGroupMap": { "0.0.0.0/0": "everyone", "[::]/0": "everyone" }, "groups": [ { "name": "everyone", "enableForwarding": true, "forwardings": [ { "forwarders": [ "dns-xxx" ], "domainsFile": "domains-File.txt" }, { "forwarders": [ { "forwarders": [ "dns-cn-xxx" ], "domainsFile": "domains-File.txt" }, ], "adguardUpstreams": [ { "proxy": null, "redis": "127.0.0.1:6781", "dnssecValidation": true, "configFile": "adguard-upstreams.txt" } ] } ] }

As in this example

ShreyasZare commented 4 months ago

As in this example

Is redis cache at the app level is what you are asking? Then its not feasible to implement this in the app since caching is quite a big thing to implement at DNS app level.

The redis cache support that I have on to-do list is to be used by the DNS server's cache implementation itself.

Potterli20 commented 4 months ago

The redis cache support that I have on to-do list is to be used by the DNS server's cache implementation itself.

I wanted to add a redis plugin cache request under each dns name on advanced forwarding.

ShreyasZare commented 4 months ago

I wanted to add a redis plugin cache request under each dns name on advanced forwarding.

Caching is quite big implementation. Its not just about storing data. It requires implementing DNS protocol level handling code. The cache code has to implement full DNS request processing and has to generate proper response. Duplicating this code at the app level is not good to have.

Also, cache works best when its shared. So, having cache per forwarder entry is not good to have design.

Potterli20 commented 4 months ago

Also, cache works best when its shared. So, having cache per forwarder entry is not good to have design.

I thought the redis cache was set for each transponder entry, which is shared by the redis cache.

Excuse me. Excuse me.

ShreyasZare commented 3 months ago

Yes, its supported. Take a look at the example adguard file that is included with the app.

It seems that [/host.com/example.com/]tls://1.1.1.1 https://1.1.1.1/dns-query is not on your list

Ohh yes. I missed read the earlier comment. Will get the app updated to support this.

Technitium DNS Server v12.1 is now available that adds support for multiple forwarders in the app.

Potterli20 commented 3 months ago

Can you get a configuration to concurrent requests? Because I see that the diary is all another DNS server request, and the other DNS request server has no related journal, but there is a corresponding journal on another DNS server. I'm guessing it's configuring load balancing requests.

ShreyasZare commented 3 months ago

Can you get a configuration to concurrent requests? Because I see that the diary is all another DNS server request, and the other DNS request server has no related journal, but there is a corresponding journal on another DNS server. I'm guessing it's configuring load balancing requests.

The app will just read all the upstream servers from the AdGuard config and then it will do concurrent requests automatically just like it works with the Forwarder settings for the DNS server.