I was wondering how http proxy in comparison with socks5 proxy handles dns resolution, as far as I have understood the dns resolution is done by the proxy and not by the application.
For this snippet I tested to see if there is any dns resolution made by viewing dns queries in Wireshark while running it.
import urllib.request
tor_proxy = urllib.request.ProxyHandler({'http' : 'http://127.0.0.1:8118/'})
opener = urllib.request.build_opener(tor_proxy)
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
urllib.request.install_opener(opener)
opener.open("http://www.google.com")
And there isn't any one made.
I would be greatful if someone could verify this and also post a good link regarding the topic, with concern to python (if there is anything to mention).
my main concern is, is there any scenario within pythons ProxyHandler where the dns resolution is made locally and not through the http proxy?