Skip to content

Instantly share code, notes, and snippets.

@hcmiya
Last active March 15, 2020 19:13
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hcmiya/e635b31ae8c4b33d903f224ddbc45197 to your computer and use it in GitHub Desktop.
Quick example of federating with darknet instances from clearnet

Quick example of federating with Tor instances from clearnet

figure1

Install and configure Tor / Privoxy

# apt install privoxy tor

Append following to /etc/tor/torrc

SOCKSPort 127.0.0.1 9050

Append following to /etc/privoxy/config

forward-socks5t .onion 127.0.0.1:9050 . # remember '.' on the end

Then restart tor and privoxy.

Configure Mastodon

Append following to .env.production

http_proxy=http://127.0.0.1:8118
ALLOW_ACCESS_TO_HIDDEN_SERVICE=true

Then restart mastodon services. Try to search users on the tor instance e.g. @root@nq5jmc5rsyo4fiph.onion, @notjeff@pleroma.oniichanylo2tsi4.onion, @xps2@5z5ce433e2yp73jqm3yxmyh2yvcn33venhnm5trqde6uwjysxyy3gbad.onion, etc.

Appendix: I2P support

figure2

Install and configure I2P / Provoxy

If you are using Debian Buster, just type following:

# apt install i2p

Otherwise see install documentation in official site: https://geti2p.net/en/download

After the installation and running I2P, You need to create new SOCKS proxy. Using HTTP proxy instead of SOCKS proxy does not work well.

  1. Open I2P router config by brower at http://127.0.0.1:7657/i2ptunnelmgr
  2. Create "New client tunnel" whose type is "SOCKS 4/4a/5" from bottom of the page.
  3. Configure new proxy as following:
    Auto Start Tunnel: True
    Access Point: Port: 9049, Reachable by: 127.0.0.1
    

Append following to /etc/privoxy/config

forward-socks5 .i2p 127.0.0.1:9049 . # remember '.' on the end

Then restart I2P client tunnel and privoxy. Try to search users on the I2P instance e.g. @root@5hftbbffiohmyugvc6vypyqhi6tl2yxo6wvyscybvv5c57pva3iq.b32.i2p

See also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment