7

Just like we have websites ending in .onion , can we have a git server running on Tor ? Theoretically it should be possible as git could be thought of as an FTP server. Has somebody done it and shared notes as to how to about doing that ? I tried various web searches with sadly nothing to show for it.

Looking forward for help.

Jens Kubieziel
  • 8,630
  • 5
  • 35
  • 116
shirish
  • 553
  • 1
  • 4
  • 16

2 Answers2

3

I have set up gits in the past, and have used Tor to protect them. It works just as setting up any other service. Simply set up your server (ensure that there is not something that could expose your true IP address in it), and then forward the port to Tor.

The only problem I have had in the past with this is the fact that it isn't easy to connect to Tor from the client end. Fortunately, using a socks5 interface, we can connect.

Aurora
  • 189
  • 11
1

From the Tor manual site:

Add the following lines to your torrc:

HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:8080

You're going to want to change the HiddenServiceDir line, so it points to an actual directory that is readable/writeable by the user that will be running Tor. The above line should work if you're using the OS X Tor package. On Unix, try "/home/username/hidden_service/" and fill in your own username in place of "username". On Windows you might pick:

HiddenServiceDir C:\Users\username\Documents\tor\hidden_service
HiddenServicePort 80 127.0.0.1:8080

Now save the torrc and restart your tor.

Accessing the hidden services is explained here

In short it says README once, than README twice:

FreeCap is an alternative. When using FreeCap set proxy protocol to SOCKS 5 and under settings set DNS name resolving to remote. This will allow you to use almost any program with Tor without leaking DNS lookups and allow those same programs to access hidden services.

Set that up correctly, you should be able to enter into a browser the tor hostname of your git server found here:

The other file Tor will create is called "hostname". This contains a short summary of your public key -- it will look something like duskgytldkxiuqc6.onion. This is the public name for your service, and you can tell it to people, publish it on websites, put it on business cards, etc.