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

Not working with -enable-doh and local dnscrypt since 0.10.7 #237

Open
XZVB12 opened this issue Sep 6, 2024 · 3 comments
Open

Not working with -enable-doh and local dnscrypt since 0.10.7 #237

XZVB12 opened this issue Sep 6, 2024 · 3 comments
Labels

Comments

@XZVB12
Copy link

XZVB12 commented Sep 6, 2024

Version

0.10.7 - 0.11.1

Operating System

Arch Linux

How are you running SpoofDPI?

./spoofdpi -dns-addr 127.0.0.4 -enable-doh -port 8087

Description

Hello, thank you for your project.
Today I tried to upgrade from 0.10.6 to 0.11.1 and found that I can't longer use the local dnscrypt as a dns source.
When i try to go to the site, the browser says that the connection failed.
if I specify 1.1.1.1 as the source of a dns such problem is not.
Version 0.10.6 is not affected by this and works without problems.
Any idea what might be the reason? Thank you.
UPD: It looks like the reason is -enable-doh, if you remove it everything works.

@XZVB12 XZVB12 added the bug label Sep 6, 2024
@XZVB12 XZVB12 changed the title Not working with local dnscrypt since 0.10.7 Not working with -enable-doh and local dnscrypt since 0.10.7 Sep 6, 2024
@Ledorub
Copy link
Collaborator

Ledorub commented Sep 6, 2024

In v0.10.6 -dns-addr didn't have any effect on DoH.

c := doh.Use(doh.CloudflareProvider, doh.GoogleProvider)

Starting from v0.10.7, DoH URL is composed as follows:

SpoofDPI/dns/doh.go

Lines 45 to 47 in bdc1a68

host = regexp.MustCompile(`^https:\/\/|\/dns-query$`).ReplaceAllString(host, "")
dohClient = &DOHClient{
upstream: "https://" + host + "/dns-query",

Where host is a host or an IP you provide as -dns-addr, or 8.8.8.8.

@XZVB12
Copy link
Author

XZVB12 commented Sep 6, 2024

Then it’s clear. dnscrypt implements this on different ports
dns 127.0.0.4:53 and DOH 127.0.0.1:3000
Is it possible to implement something similar in this project ?
I tried -dns-addr 127.0.0.1 -dns-port 3000 -enable-doh Unfortunately not working

@munrocket
Copy link

Can confirm.

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

No branches or pull requests

3 participants