dns-over-https icon indicating copy to clipboard operation
dns-over-https copied to clipboard

Unsupported protocol scheme

Open bejaneps opened this issue 5 years ago • 4 comments

Minimal issue reproduction

Go Version

1.15

OS and Arch

Ubuntu/Bionic Beaver - amd64

Steps

  1. add 127.0.0.53:53 in doh-client.conf to listen array (or if your dns is configured to listen on 127.0.0.1:53, then skip this step)
  2. stop systemd-resolved service (if it's running in your system)
  3. start doh-client with
./doh-client -conf doh-client.conf 
  1. send 4-5 dns requests using
host -v google.com

Output

Getting: Host google.com not found: 2(SERVFAIL) every 2-3 request using host tool

Also, on doh-client getting following output:

Get "?ct=application/dns-message&dns=AAABAAABAAAAAAABBnZvcnRleARkYXRhCW1pY3Jvc29mdANjb20AABwAAQAAKQSwAAAAAAAA": unsupported protocol scheme ""

Remarks

I dived into code and found that unsupported protocol scheme is from roundTrip function in net std library, which is called by (t *Transport) RoundTrip(r *Request).

Also, I see that this triggered in file doh-client/ietf.go:

https://github.com/m13253/dns-over-https/blob/4f46b89febf08ad906be51765b1703cb61e2f90a/doh-client/ietf.go#L150-L158

My opinion issues is somewhere in client.go file func (c *Client) newHTTPClient() error

bejaneps avatar Aug 29 '20 18:08 bejaneps

Thank you for your report and detailed reproducing steps. Would you please post your doh-client.conf so I can have a check at it?

m13253 avatar Sep 01 '20 01:09 m13253

It's same as default doh-client.conf, but I've added this listen addr to the list: "127.0.0.53:53" . Because my system if configured to listen on that addr.

bejaneps avatar Sep 01 '20 02:09 bejaneps

It's same as default doh-client.conf, but I've added this listen addr to the list: "127.0.0.53:53" . Because my system if configured to listen on that addr.

I think you need to post the full-text of the configuration file -- even if it is the default one. One possible reason may be there is an empty upstream server URL, possibly lying in the configuration file, or in our code.

m13253 avatar Nov 22 '20 13:11 m13253

Can't reproduce your problem. Please submit a full-text. Also try to use the latest source code of doh-client.

m13253 avatar Jan 04 '21 19:01 m13253

Please submit this issue again, if still reproducible, so that others can also reproduce it.

Thanks!

gdm85 avatar Sep 03 '22 08:09 gdm85