-
Notifications
You must be signed in to change notification settings - Fork 126
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
Add DoH and DoT support #431
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* working input demultiplexor with tls * handled tcp conns * handle HTTPS de-multiplexing * lint * improved error msg if user only supplies IPv4 addresses and we fail config validation * added AXFR edge case handling * added comments * if TCP connection is closed, re-open it * don't loop in retrying tcp connection * spelling * close TCP conns in Close() * trying multiple de-multiplexors * Revert "trying multiple de-multiplexors" This reverts commit 2cb7877. * TEST - check how long non-network activity takes * TEST - :( * removed testing line * trying giving the pool channels a capacity * implement work-balancing scheme * added small wait before going to global queue * fix errors if destination closes the TCP connection * lint * refactor - coalesce language around worker channels * removed the shouldRetryIfConnClosed bool, didn't add anything * cleanup * add ns stickiness but remove fancy channel stuff * force to re-create TCP conn if it's closed by receiver * remove log msg for debug * added ServerCert verification * lint
…oogle server name
zakird
approved these changes
Sep 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #336
Description
This PR adds support for DoH and DoT lookups. Despite the large changeset, 50% of the lines changed are in
go.mod
/go.sum
and reflect the dependencies ofzcrypto
.Change Description
--tls
and--https
for user to request DoT and DoH, respectively--tls
and--https
are mutually exclusive--iterative
nor--udp-only
sheriff
to allow us to specify the verbosity of the JSON structs we're returning to the user. However,sheriff
casts everything to an interface, or a slice ofinterface{}
. This is problematic because when you go to Marshall a byte array that's been cast as a[]interface{}
where the elements happen to beuint8
,json.Marshall
will print out:[123, 7, 78,...]
. This is completely useless to the user. So I added a new filesrc/cli/util.go
with a conversion function that will convert[]interface{} (uint8)
->[]uint8
. This gives us sane output (see below, any of the base64-encoded strings are byte arrays underneath).--https
todns.google
andcloudflare-dns.com
--name-server-mode
and normal usage for both--tls
and--https
New
Network Options
Examples
Testing
Basic
--tls
Usage--tls
with--name-servers
--tls
with domain name sas--name-server
Basic
--https
UsageBasic
--https
Usage, trying to use IP-only name server--https
with--name-server
(Quad9)Current Limitations
There is currently no server certificate verification, ie.
InsecureSkipVerify
always istrue
. When I looked atzgrab2
's implementation, I don't think it's performing server-cert verification either, or at least its erroring out.MacOS
Ubuntu
a similar story
Perhaps there's an issue in ZCrypto, but either way I feel that can be added separately.