Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend url scheme to allow setting pre-resolved IPs for DoT and DoH #5217

Open
3 tasks done
wesley800 opened this issue Nov 30, 2022 · 3 comments · May be fixed by #5218
Open
3 tasks done

Extend url scheme to allow setting pre-resolved IPs for DoT and DoH #5217

wesley800 opened this issue Nov 30, 2022 · 3 comments · May be fixed by #5218

Comments

@wesley800
Copy link

wesley800 commented Nov 30, 2022

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • I want to request a feature or enhancement and not ask a question

Description

dnsproxy actually provides upstream.Options.ServerIPAddrs for manually defining the IPs used for DNS lookups of any upstream. For DoT and DoH upstreams, this can't be alternated by simply changing domain to IPs for non-tls upstreams, like tcp://example.dns.server to tcp://1.2.3.4, because of the hostname required in certificate validation. Unfortunately for now there's no way to utilize ServerIPAddrs field to build an TLS upstream with both domain and IP specified.

I suggest to add some magic params to the url for (single or multiple) server IP setting. e.g. tls://1dot1dot1dot1.cloudflare-dns.com/?adguardhome_upstream_ip=1.1.1.1&adguardhome_upstream_ip=[2606:4700:4700::1001] .

@wesley800 wesley800 linked a pull request Nov 30, 2022 that will close this issue
@57382
Copy link

57382 commented May 23, 2023

@wesley800
hosts
1.1.1.1 cloudflare-dns.com

will AdGuardHome ignore this hosts setting?

@57382
Copy link

57382 commented May 23, 2023

Prerequisites

  • I have checked the Wiki and Discussions and found no answer
  • I have searched other issues and found no duplicates
  • I want to request a feature or enhancement and not ask a question

Description

dnsproxy actually provides upstream.Options.ServerIPAddrs for manually defining the IPs used for DNS lookups of any upstream. For DoT and DoH upstreams, this can't be alternated by simply changing domain to IPs for non-tls upstreams, like tcp://example.dns.server to tcp://1.2.3.4, because of the hostname required in certificate validation. Unfortunately for now there's no way to utilize ServerIPAddrs field to build an TLS upstream with both domain and IP specified.

I suggest to add some magic params to the url for (single or multiple) server IP setting. e.g. tls://1dot1dot1dot1.cloudflare-dns.com/?adguardhome_upstream_ip=1.1.1.1&adguardhome_upstream_ip=[2606:4700:4700::1001] .

Allow specifying resolver's IP address
AdguardTeam/dnsproxy#50
already done

Is this what you want?

@wesley800
Copy link
Author

wesley800 commented May 23, 2023

hosts: 1.1.1.1 cloudflare-dns.com

I prefer a way to specify IP only for ADGH, so didn't tried this. Currently I'm using a dnsmasq for bootstrap, putting address=/1dot1dot1dot1.cloudflare-dns.com/1.1.1.1 in its setting. But adding extra dependencies is not so satisfactory.

AdguardTeam/dnsproxy#50

Sorry I didn't find a way to specify the IP in ADGH. Might this issue only related to the ADGH core (or dnsproxy, to be more specific), and my PR is about how to utilize it in ADGH for users? I'm not very sure though. Looking forward to repo members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants