Description
Currently, mosdns only supports RFC 8484 standard DoH (GET with base64url encoding). However, some major DNS providers like doh.pub (Tencent DNSPod) only support non-standard DoH methods:
- doh.pub: Returns 502 when using RFC 8484 GET method, but works with URL parameter format (
?name=domain&type=A)
- Other providers may have similar issues
Request
Would you consider adding an option to support alternative DoH request methods? For example:
upstreams:
- addr: \"https://doh.pub/dns-query\"
doh_method: \"GET\" # default, RFC 8484
# or
doh_method: \"POST\" # alternative
Or alternatively, auto-detect and fallback?
Test Results
- RFC 8484 GET:
https://doh.pub/dns-query?dns=<base64> → 502 Bad Gateway
- URL parameter:
https://doh.pub/dns-query?name=baidu.com&type=A → Works fine
This issue affects usability with some popular Chinese DNS providers.
Environment
- mosdns version: v5.3.x
- Server: Linux/OpenWrt
References
Description
Currently, mosdns only supports RFC 8484 standard DoH (GET with base64url encoding). However, some major DNS providers like doh.pub (Tencent DNSPod) only support non-standard DoH methods:
?name=domain&type=A)Request
Would you consider adding an option to support alternative DoH request methods? For example:
Or alternatively, auto-detect and fallback?
Test Results
https://doh.pub/dns-query?dns=<base64>→ 502 Bad Gatewayhttps://doh.pub/dns-query?name=baidu.com&type=A→ Works fineThis issue affects usability with some popular Chinese DNS providers.
Environment
References