Unsupported protocol scheme
Minimal issue reproduction
Go Version
1.15
OS and Arch
Ubuntu/Bionic Beaver - amd64
Steps
- 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)
- stop systemd-resolved service (if it's running in your system)
- start doh-client with
./doh-client -conf doh-client.conf
- 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
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?
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.
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.
Can't reproduce your problem. Please submit a full-text. Also try to use the latest source code of doh-client.
Please submit this issue again, if still reproducible, so that others can also reproduce it.
Thanks!