qiuzi / dns2socks

dns2socks
144 stars 63 forks source link

[Suggestion] Remote DNS lookups over SOCKS5 proxy #8

Open phantomcraft opened 6 years ago

phantomcraft commented 6 years ago

If a SOCKS5 proxy has builtin DNS resolution, instead of passing a remote DNS server (8.8.8.8, 1.1.1.1 and others), ask the proxy for resolve domains directly with its own DNS.

Curl does with --socks5h: https://curl.haxx.se/libcurl/c/CURLOPT_SOCKS_PROXY.html

"or socks5h:// (the last one to enable socks5 and asking the proxy to do the resolving, also known as CURLPROXY_SOCKS5_HOSTNAME type)"