0

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?

2
  • Tor acts as a SOCKS proxy (on port 9050 by default). You can find an overview of the protocol here. Do you have a more specific question?
    – Steve
    Jul 15 at 19:16
  • I wasn't really clear with what I was looking for. I want the documentatio. Jul 15 at 20:12

1 Answer 1

0

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.

1
  • Thanks, but the tool I am using already supports socks. What I was looking for is answers to questions like: how do I open a tor proxy (without just opening the tor browser). How can I run multiple proxies at the same time? How do I close a tor proxy? Jul 16 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.