I am trying to get some of my own code to make http requests over tor. However, I can't find any documentation on how to do this.
Where can I find documentation on connecting to tor as a proxy?
Tor Stack Exchange is a question and answer site for researchers, developers, and users of Tor. It only takes a minute to sign up.
Sign up to join this communityI am trying to get some of my own code to make http requests over tor. However, I can't find any documentation on how to do this.
Where can I find documentation on connecting to tor as a proxy?
To make a request over Tor, you need to create a socket to tor's SOCKS proxy port, and then send/receive data on that socket following the SOCKS protocol. I don't think that there's any specific Tor documentation about how to write a program that communicates with tor's SOCKS proxy.
Tor's SOCKS support is documented at: "Tor's extensions to the SOCKS protocol" — https://gitweb.torproject.org/torspec.git/tree/socks-extensions.txt
If you want an example of how to connect to the SOCKS proxy, a good example might be the source code of torsocks: https://gitweb.torproject.org/torsocks.git/tree/src/common/socks5.c
Depending on your programming language, there are probably libraries that will take care of the SOCKS stuff for you.