Contributing With Tor

... or how to setup Tor git access with darkfi repo.

We assume you have tor installed locally and access to Tor browser. You can check your tor daemon is running by running this command:

curl --socks5-hostname

Setting Up Codeberg

Follow these steps:

  1. Generate a new SSH key using the command: ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_tor -C foo@foo
  2. Next use Tor Browser to make a codeberg account, and get this added to the darkfi repo.
  3. Add your key .ssh/ to your account on codeberg.
  4. Verify your key by signing the message: echo -n 'XXX' | ssh-keygen -Y sign -n gitea -f ~/.ssh/id_tor where XXX is the string given on codeberg.

SSH Config

You will need BSD netcat installed. Optionally you could use GNU netcat, but the flags are different; replace -x with --proxy ... --proxy-type=socks5.

Add a section in ~/.ssh/config like this:

Host codeberg-tor
    # Use this for debugging errors
    #LogLevel VERBOSE
    User git
    IdentitiesOnly yes
    IdentityFile ~/.ssh/id_tor
    ProxyCommand nc -x %h %p

Then test it is working with ssh -T git@codeberg-tor -vvv. Be sure to verify the signatures match those on the codeberg website. To see them, copy this link into Tor Browser:

Adding the Git Remote

The last step is routine:

git remote add codeberg git@codeberg-tor:darkrenaissance/darkfi.git
# Optionally delete the github origin:
git remote rm origin

And then finally it should work. Make sure you use git push -u codeb master to update your main source to codeberg over Tor. You don't want to accidentally git push to github and dox yourself.