support running multiple DoH/DoT DNSTT tunnels#1508
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the DNS tunneling functionality by introducing support for multiple DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) resolvers, replacing the previous single-resolver approach with predefined resolver lists to enable creation of multiple DNS tunnels.
- Adds predefined lists of DoH and DoT resolvers for redundancy and load distribution
- Refactors
newDNSTTtonewDNSTTsto create multiple DNSTT instances - Updates HTTP client initialization to integrate multiple DNS tunnels
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| common/httpclient.go | Adds resolver lists, refactors DNS tunnel creation to support multiple instances, and updates HTTP client configuration |
| common/httpclient_test.go | Introduces test suite to validate DoH/DoT resolver functionality |
Comments suppressed due to low confidence (1)
common/httpclient_test.go:36
- The error message incorrectly states 'DNS over TLS resolvers' when this is testing DoH resolvers. It should say 'All DNS over HTTPS resolvers failed'.
assert.Empty(t, failed, "All DNS over TLS resolvers failed")
|
@garmr-ulfr sorry, I just noticed that I forgot to review this PR! Do we still want to merge it? Kindling already receives a list of DNS servers that should be used by the smart dialer, shouldn't we use the same list here? |
|
@WendelHime, honestly, I forgot about this too 😆.
I'm not sure, but, since we'll be moving away from flashlight completely soon, I don't think it really matters. |
This pull request introduces support for multiple DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) resolvers in the
common/httpclient.gofile, replacing the previous single-resolver approach. It also includes a new test suite to validate the functionality of these resolvers.Enhancements to DNS Resolver Functionality:
dohResolversanddotResolvers) to enable the creation of multiple DNS tunnels. (common/httpclient.go, common/httpclient.goR43-R64)newDNSTTtonewDNSTTs: The function now initializes multipleDNSTTinstances using all resolvers in the lists, instead of a single instance based on a single resolver. (common/httpclient.go, [1] [2]GetHTTPClientto integrate multiple DNS tunnels into the HTTP client configuration. (common/httpclient.go, common/httpclient.goL100-R128)Testing Improvements:
TestDNSResolversincommon/httpclient_test.goto validate each DoH/DoT provider.