Tor: Difference between revisions

From Alpine Linux
No edit summary
(Added how to connect via bridge since, torrc.sample and other wikis linked here don't have it.)
 
(One intermediate revision by the same user not shown)
Line 18: Line 18:
ClientTransportPlugin obfs4 exec /usr/bin/lyrebird}}
ClientTransportPlugin obfs4 exec /usr/bin/lyrebird}}


In particular countries such as Russia this might not work. In this case, access Tor network via bridge. First get bridges either from official [https://t.me/GetBridgesBot Telegram bot] or request bridges from settings of Tor Browser installed on another machine. Then append to {{Path|/etc/tor/torrc}} bridge connection arguments:{{Cat|/etc/tor/torrc|...
For config changes in {{Path|/etc/tor/torrc}} to take effect (re)start the tor daemon: {{Cmd|# rc-service tor restart}}
Bridge obfs4 12.34.56.78:90 FINGERPRINTALLCAPS123 cert=verylongcert iat-mode=0  
 
In particular countries such as Russia, using {{Pkg|lyrebird}} might not be enough. In which case, access Tor network via bridge. First get a bridge either from official [https://t.me/GetBridgesBot Telegram bot] or request one using a Tor Browser installed on another machine. Then add the following to your {{Path|/etc/tor/torrc}}:{{cat|/etc/tor/torrc|...
# Substitute bridge connection arguments with those received when requesting bridges
# There can be multiple bridges, one line per bridge
Bridge obfs4 ip:port RSA cert<nowiki>=</nowiki>cert iat-mode<nowiki>=</nowiki>0
UseBridges 1}}
UseBridges 1}}



Latest revision as of 19:37, 31 March 2025

The Onion Routing (Tor) project, aims to have a way to use the internet with as much privacy as possible, and the idea was to route traffic through multiple servers and encrypt it each step of the way.

Installation

The Tor daemon can be installed using the tor package. Use OpenRC to manage the tor service.

Note: The official Tor browser can only be installed using Flatpak.

Configuration

Tor service

Tor reads its configurations from the file /etc/tor/torrc by default, or if the latter is not found, from $HOME/.torrc. A example configuration with documentation is in the file /etc/tor/torrc.sample. Logs are written to /var/log/tor/notices.log by default.

The default configuration should work fine for most Tor users.

If Tor connections are blocked in your country, use lyrebird package for a transparent proxy solution. To allow your tor daemon to use lyrebird, add the following line to your tor config file /etc/tor/torrc as follows:

Contents of /etc/tor/torrc

... ClientTransportPlugin obfs4 exec /usr/bin/lyrebird

For config changes in /etc/tor/torrc to take effect (re)start the tor daemon:

# rc-service tor restart

In particular countries such as Russia, using lyrebird might not be enough. In which case, access Tor network via bridge. First get a bridge either from official Telegram bot or request one using a Tor Browser installed on another machine. Then add the following to your /etc/tor/torrc:

Contents of /etc/tor/torrc

... # Substitute bridge connection arguments with those received when requesting bridges # There can be multiple bridges, one line per bridge Bridge obfs4 ip:port RSA cert=cert iat-mode=0 UseBridges 1

For config changes in /etc/tor/torrc to take effect (re)start the tor daemon:

# rc-service tor restart

Firefox browser

To use the Tor service running on the local host, configure Firefox browser as follows:

  • In Preferences > General > Network Settings > Settings... , select Manual proxy configuration.
  • Enter SOCKS host localhost with port 9050 (SOCKS v5).

Tractor

The Tractor tool available as tractor package can be used to control the Tor daemon using the versatile GSettings for a personalized TOR experience. The GUI front-end Carburetor for Tractor is also available as carburetor package.

See also