I've been trying to find out how I would connect to a TOR proxy or connect to the TOR network. With the Socksipy module, I see that people (other stack overflow TOR python questions) can connect to a proxy, but I do not understand a concept.
import socks, socket
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050) #localhost??
socket.socket = socks.socksocket
I do get how you can connect to a TOR proxy, but the proxy is your local host just through port 9050? Is this because everyone does not want to show real TOR proxy? How do I connect to a TOR proxy, and if this is the case, why?
torsocks.confto read more info about why127.0.0.1was set default. or take a look at this