tor2web: how to run a proxy

Want to set up a proxy of your own? Here's how:

  1. Get a server. For simplicity, we'll assume you're running a recent version of Ubuntu. (Don't have a server? You can get one using Amazon's EC2 with Ubuntu AMIs.)

  2. Install the latest version of Tor. (Details here.)

    Give Tor a second to start up. Soon you should be able to visit hidden services using Tor's SOCKS proxy. You can test this with:

    curl -i --socks4a 127.0.0.1:9050 http://duskgytldkxiuqc6.onion/

  3. apt-get install privoxy

    Apache (our webserver) doesn't currently speak SOCKS; Privoxy is required to translate normal HTTP requests to SOCKS.

    Replace /etc/privoxy/config with our Privoxy config and restart:

    /etc/init.d/privoxy restart

    You should now be able to visit hidden services thru Privoxy. You can test this with:

    curl -x 127.0.0.1:8118 http://duskgytldkxiuqc6.onion/

  4. apt-get install apache2

    Apache is being used as caching proxy; it speeds up tor2web requests by caching the results.

    Replace the config file /etc/apache2/apache2.conf with our version, then restart Apache:

    /etc/init.d/apache2 restart

    You should now be a tor2web server. Test this with:

    curl -k -H "Pragma: none" -H "Host: duskgytldkxiuqc6.tor2web.org" -i https://127.0.0.1/

    Run it again and it should return instantly from the cache.

That's it!

Send your IP address to info@tor2web.org and ask to be added to the *.tor2web.org round-robin. This will allow your server to respond to requests from the public for Tor hidden services.

If you have trouble with the process or would like a different way of doing it, let me know. If you want to build scripts or tools to simplify this process, that would be great too. You might also be interested in running a Tor relay.

See also: Is this legal?

info@tor2web.org