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

feat: DoH3 resolver #166

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

Ledorub
Copy link
Collaborator

@Ledorub Ledorub commented Aug 19, 2024

With recent changes made in #161 and refactoring that followed in #163, it is now easy to add new resolvers.

This PR adds an experimental DNS-over-HTTP/3 resolver on top of the #163. Its implementation depends on quic-go module, as Go's STL is not ready for HTTP/3 yet.

To use the resolver one should replace the following line of code:
https://github.com/Ledorub/SpoofDPI/blob/e29f02d596df8f7355f8280c5622aa508ce89159/dns/dns.go#L38
with:

		dohClient:     client.NewDOH3Resolver(addr),

I used it for a day, and for me it was less stable and performant than the default DoH resolver. Some lookups take 100+ ms to resolve, some fails with timeout. It is not clear, what causes the issues. Is it a calling code, HTTP client & transport configuration or the quic-go module.

@ohaiibuzzle
Copy link
Contributor

Please correct me if I'm wrong, but isn't DoH3/DoQ is a pretty bad idea for anti-censorship since they specifically use port 8853 and would not masquerade as well with HTTPS traffic on 443?

@Ledorub
Copy link
Collaborator Author

Ledorub commented Aug 20, 2024

isn't DoH3/DoQ is a pretty bad idea for anti-censorship

As far as I am aware, DoH3 and DoQ are not the same thing. DoQ relies on Quic as a transport-level protocol, which is built on top of UDP and uses UDP port 853, while DoH3 relies on HTTP, which happens to be HTTP/3, which in turn uses Quic as transport.

@Ledorub
Copy link
Collaborator Author

Ledorub commented Aug 20, 2024

@xvzc I was going to pull the changes from origin/dev to fork to rebase this branch on top of them, but the dev branch is gone from the main repo. Are both #161 and #163 scrapped?

@xvzc
Copy link
Owner

xvzc commented Aug 20, 2024

OMG i for got to merge it. i still have it in my local i will resolve and merge it to the main now

@Ledorub
Copy link
Collaborator Author

Ledorub commented Aug 20, 2024

Ok, I pushed my local copy to the fork's branch in case you need it.

@xvzc
Copy link
Owner

xvzc commented Aug 20, 2024

It's done but i actually had to overwrite the conflicted files because there was too much conflict with current main branch. I'm so sorry about this.

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

Successfully merging this pull request may close these issues.

3 participants