Browsers can proxy DNS requests through SOCKS 5. What I don't understand is how the process works.
Correct me if I'm wrong. In normal DNS operation, a program does DNS resolution through its operating system, which in turn is configured to access a specific DNS server(s) and make queries there. So, in normal operation a browser should not do DNS queries over the network by himself.
Now, with a SOCKS proxy, the browser needs to do his own queries. How that the browser knows which DNS server will exist at the other end of the proxy tunnel?
But with SOCKS5 proxy configured the browser simply asks to the SOCKS5 to connect to hosts using the host name of the host instead of its IP address. It's up to the SOCKS5 proxy then to do the lookup.
In normal DNS operation, a program does DNS resolution through its operating system, which in turn is configured to access a specific DNS server (s) and make queries there. So, in normal operation a browser should not do DNS queries over the network by himself. Now, with a SOCKS proxy, the browser needs to do his own queries.
SOCKS is an internet protocol that routes packets between a server and a client using a proxy server. Your traffic is routed through a proxy server that generates an arbitrary IP address before you reach your destination.
SOCKS5 vs HTTP proxy Unlike HTTP proxies, which can only interpret and work with HTTP and HTTPS webpages, SOCKS5 proxies can work with any traffic. HTTP proxies are high-level proxies usually designed for a specific protocol. While this means you get better connection speeds, they’re not nearly as flexible and secure as SOCKS proxies.
The browser doesn't do his own DNS lookups then. I don't know if there are actual situations in which a browser will speak DNS to a DNS server. But with SOCKS5 proxy configured the browser simply asks to the SOCKS5 to connect to hosts using the host name of the host instead of its IP address. It's up to the SOCKS5 proxy then to do the lookup.
I know this because I maintain a SOCKS5 implementation.
It depends on your browser. Firefox, for example, sends hostname to SOCKS proxy without resolving it. You can confirm that by Wireshark.
PS. assume you are using a SOCKS5/4a proxy. SOCKS4 does not support hostname. Ref: https://en.wikipedia.org/wiki/SOCKS#SOCKS4a
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With