AdguardTeam / dnsproxy

Simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support
Apache License 2.0
2.27k stars 240 forks source link

v0.64.0 can no longer use IPv6 upstream #379

Closed timkgh closed 5 months ago

timkgh commented 5 months ago

With config:

upstream:
  - "https://[2620:fe::fe:11]/dns-query"
  - "https://[2620:fe::11]/dns-query"

v0.64.0 no longer starts:

Jan 29 08:36:39  dnsproxy[19719]: 2024/01/29 08:36:39 [fatal] error while parsing upstreams configuration: parsing error at index 0: cannot prepare the upstream: invalid address [2620:fe::fe:11]: bad hostname "[2620:fe::fe:11]": bad top-level domain name label "[2620:fe::fe:11]": bad top-level domain name label rune '['
Jan 29 08:36:39  dnsproxy[19719]: parsing error at index 1: cannot prepare the upstream: invalid address [2620:fe::11]: bad hostname "[2620:fe::11]": bad top-level domain name label "[2620:fe::11]": bad top-level domain name label rune '['

It works in v0.63.1

schzhn commented 5 months ago

Thank you for your report. Fixed in v0.64.1.

timkgh commented 5 months ago

It works, thanks for the fix! Could you please log the upstreams at startup? It would be very useful to confirm such cases when using a mix of ipv4 and ipv6. I asked for it a while back, like 2 years ago ... https://github.com/AdguardTeam/dnsproxy/issues/200