Little-t-tor

Attenzione: Queste istruzioni sono destinate all'installazione di tor il demone di rete, ovvero little-t-tor. For instructions on installing Tor Browser, refer to Tor Browser user manual.

Accesso admin: Per installare Tor è necessario avere privilegi di root. Di seguito, tutti i comandi che devono essere eseguiti come utente root, come apt e dpkg, sono preceduti da '#', mentre i comandi da eseguire come utente sono preceduti da '$', per rappresentare il prompt standard in un terminale.

Debian / Ubuntu

Non usare pacchetti provenienti dall'universo Ubuntu. In the past they have not reliably been updated. That means you could be missing stability and security fixes.

Configura il repository di pacchetti Tor.

Abilita il repository APT del progetto Tor seguendo le istruzioni.

Installazione del pacchetto

# apt install tor

Fedora

Configura il repository di pacchetti di Tor

Abilita il repository di pacchetti RPM del progetto Tor seguendo le istruzioni.

Installazione del pacchetto

# dnf install tor

FreeBSD

Installazione del pacchetto

# pkg install tor

OpenBSD

Installazione del pacchetto

# pkg_add tor

macOS

Install a package manager

Esistono due gestori di pacchetti su OS X: Homebrew e Macports. Puoi utilizzare il gestore di pacchetti che preferisci.

Per installare Homebrew segui le istruzioni su brew.sh.

Per installare Macports segui le istruzioni su macports.org.

Installazione del pacchetto

Se utilizzi Homebrew in una finestra Terminal, esegui:

# brew install tor

Se utilizzi Macports in una finestra Terminal, esegui:

$ sudo port install tor

Arch Linux

To install the tor package on Arch Linux, run:

# pacman -Syu tor

DragonFlyBSD

Bootstrap pkg

Gli snapshot e le release giornaliere di DragonFlyBSD (a partire dalla 3.4) vengono fornite con pkg già installato. Gli aggiornamenti da versioni precedenti, tuttavia, non lo avranno. Se pkg manca sul sistema per qualsiasi motivo, può essere avviato rapidamente senza doverlo compilare dai sorgenti e senza dover installare DPorts:

# cd /usr
# make pkg-bootstrap
# rehash
# pkg-static install -y pkg
# rehash

Passaggi consigliati per configurare pkg

Qui sarà simile a quello che abbiamo su un sistema FreeBSD e useremo HTTPS per recuperare i pacchetti e gli aggiornamenti, quindi abbiamo bisogno di un pacchetto aggiuntivo per aiutarci (ca_root_nss).

Installing the ca_root_nss package:

# pkg install ca_root_nss

Per le nuove installazioni, il file /usr/local/etc/pkg/repos/df-latest.conf.sample viene copiato in /usr/local/etc/pkg/repos/df-latest. I file che terminano con l'estensione ".sample" vengono ignorati; pkg(8) legge solo i file che terminano con ".conf" e ne leggerà quanti ne trova.

DragonflyBSD ha 2 repository di pacchetti:

  • Avalon (mirror-master.dragonflybsd.org);
  • Wolfpond (pkg.wolfpond.org).

È sufficiente modificare l'URL usato per indicare i repository in /usr/local/etc/pkg/repos/df-latest e il gioco è fatto! Ricordarsi di usare pkg+https:// per Avalon.

Dopo aver applicato tutte queste modifiche, aggiorniamo nuovamente l'elenco dei pacchetti e cerchiamo di verificare se c'è già un nuovo aggiornamento da applicare:

# pkg update -f
# pkg upgrade -y -f

Installazione del pacchetto

Installa il pacchetto tor:

# pkg install tor

NetBSD

Configura pkg_add

Le versioni moderne del sistema operativo NetBSD possono essere impostate per usare pkgin, che è un software che ha lo scopo di essere come apt o yum per la gestione dei pacchetti binari pkgsrc. In questo caso non si converte la sua configurazione e si sceglie di usare invece il semplice pkg_add.

# echo "PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/$(uname -r)/All" > /etc/pkg_install.conf

Installazione del pacchetto

Installare il pacchetto tor di NetBSD:

# pkg_add tor

Void Linux

Per installare il pacchetto tor su Void Linux, eseguire:

# xbps-install -S tor

Installing Tor from source

Scarica l'ultima release e le dipendenze

The latest release of Tor can be found on the download page.

Se stai compilando dai sorgenti, prima installa libevent e assicurati di avere openssl e zlib (incluse le versioni -devel, se applicabile).

Install tor

tar -xzf tor-<version>.tar.gz; cd tor-<version>

Sostituisci <version> con l'ultima versione di tor, ad esempio tor-0.4.8.12

./configure && make

Ora puoi eseguire tor come src/app/tor (versione 0.4.3.x e successive), o puoi eseguire make install (come root, se necessario) per installarlo in /usr/local/, e quindi puoi avviarlo semplicemente eseguendo tor.

Attenzione: Queste istruzioni sono per verificare il codice sorgente di tor. Seguire le istruzioni corrette per verificare la firma di Tor Browser.

La firma digitale è un processo che assicura che un certo pacchetto sia stato creato dai suoi sviluppatori e che non sia stato manomesso. Di seguito spieghiamo perché è importante e come verificare che il codice sorgente di tor che scarichi sia quello che abbiamo creato noi e che non sia stato modificato da un attaccante.

Ogni file sulla nostra pagina di download è accompagnato da due file denominati "checksum" e "sig" con lo stesso nome del pacchetto e l'estensione ".sha256sum" e ".sha256sum.asc" rispettivamente.

Il file .asc verificherà che il file .sha256sum (contenente il checksum del pacchetto) non sia stato manomesso. Una volta validata la firma (vedi di seguito come farlo), l'integrità del pacchetto può essere validata con:

$ sha256sum -c *.sha256sum

Questi file ti permettono di verificare che il file scaricato sia esattamente quello che abbiamo inteso farti ottenere. Questo varia a seconda del browser web, ma generalmente puoi scaricare questo file facendo clic con il tasto destro sul link "sig" e "checksum" e selezionando l'opzione "salva file come".

Ad esempio, tor-0.4.6.7.tar.gz è accompagnato da tor-0.4.6.7.tar.gz.sha256sum.asc. Questi sono solo esempi di nomi di file e non corrisponderanno esattamente a quelli dei file che scaricherai.

Ora ti mostriamo come puoi verificare la firma digitale del file scaricato nei vari sistemi operativi. Ti informiamo che la firma è datata a quando il pacchetto è stato firmato. Pertanto, ogni volta che un nuovo file viene caricato una nuova firma viene generata con una data diversa. Finché hai verificato la tua firma non dovresti preoccuparti che la data riportata potrebbe cambiare.

Installazione di GnuPG

Prima di tutto hai bisogno di installare GnuPG prima di poter verificare le firme.

Per gli utenti Windows:

Se utilizzi Windows, scarica Gpg4win e esegui l'installer.

Per verificare il file è necessario eseguire comandi da terminale cmd.exe da windows.

Per gli utenti macOS:

Se stai usando macOS, puoi installare GPGTools.

Per verificare li file dovresti necessitare della riga di comando (Applications-Utility).

Per gli utenti GNU/Linux:

Se stai usando GNU/Linux probabilmente hai già GnuPG nel tuo sistema, molte distribuzioni lo hanno preinstallato.

Per verificare la firma sarà necessario digitare alcuni comandi in una finestra del terminale. Come farlo varia a seconda della tua distribuzione.

Recuperare la chiave per sviluppatori Tor

Le seguenti chiavi possono firmare il tarball. Non aspettarti di trovarle tutte; può variare a seconda di chi è disponibile per fare il rilascio.

Puoi recuperare la chiave con i link forniti sopra o con:

$ gpg --auto-key-locate nodefault,wkd --locate-keys ahf@torproject.org
$ gpg --auto-key-locate nodefault,wkd --locate-keys dgoulet@torproject.org
$ gpg --auto-key-locate nodefault,wkd --locate-keys nickm@torproject.org

Dovresti vedere qualcosa come (per nickm):

gpg: key FE43009C4607B1FB: public key "Nick Mathewson <nickm@torproject.org>" imported
gpg: Numero totale proccessati: 1
gpg:                       importati: 1
pub   rsa4096 2016-09-21 [C] [expires: 2025-10-04]
      2133BC600AB133E1D826D173FE43009C4607B1FB
uid           [ unknown] Nick Mathewson <nickm@torproject.org>
sub   rsa4096 2016-09-23 [S] [expires: 2025-10-04]
sub   rsa4096 2016-09-23 [E] [expires: 2025-10-04]

Se viene visualizzato un messaggio di errore, qualcosa è andato storto e non si può continuare finché non si è capito perché non ha funzionato. Potresti riuscire a importare la chiave utilizzando la sezione Workaround (usando una chiave pubblica) invece.

Dopo aver importato la chiave, puoi salvare su un file (identificandola dalla sua impronta qui):

$ gpg --output ./tor.keyring --export 0x2133BC600AB133E1D826D173FE43009C4607B1FB

Questo comando salva la chiave in un file che si trova nel percorso ./tor.keyring, ovvero nella directory corrente. Se ./tor.keyring non esiste una volta eseguito questo comando, qualcosa è andato storto e non puoi continuare finchè non hai capito cosa non ha funzionato.

Verificare la firma

Per verificare la firma del pacchetto scaricato, sarà necessario scaricare il file di firma .sha256sum.asc corrispondente e il file .sha256sum stesso, e verificarlo con un comando che chiede a GnuPG di verificare il file che hai scaricato.

L'esempio presume che hai scaricato due file dalla tua cartella "Downloads". Nota che questi comandi usano esempi di nomi di file e i tuoi saranno diversi: avrai scaricato una versione diversa dalla 9.0 e potresti non aver scelto la versione English (en-US).

Per gli utenti Windows:

gpgv --keyring .\tor.keyring Downloads\tor-0.4.6.10.tar.gz.sha256sum.asc Downloads\tor-0.4.6.10.tar.gz.sha256sum

Per gli utenti macOS:

gpgv --keyring ./tor.keyring ~/Downloads/tor-0.4.6.10.tar.gz.sha256sum.asc ~/Downloads/tor-0.4.6.10.tar.gz.sha256sum

Per utenti BSD/Linux:

gpgv --keyring ./tor.keyring ~/Downloads/tor-0.4.6.10.tar.gz.sha256sum.asc ~/Downloads/tor-0.4.6.10.tar.gz.sha256sum

Il risultato del comando dovrebbe produrre qualcosa come questo (a seconda della chiave utilizzata per la firma):

gpgv: Signature made Mon 16 Aug 2021 04:44:27 PM -03
gpgv:                using RSA key 7A02B3521DC75C542BA015456AFEE6D49E92B601
gpgv: Good signature from "Nick Mathewson <nickm@torproject.org>"

Se ricevi messaggi di errore che contengono 'Nessun file o directory', qualcosa è andato storto in uno dei passi precedenti, o hai dimenticato che questi comandi utilizzano esempi di nomi di file, e i tuoi saranno diversi.

Potresti anche voler saperne di più riguardo GnuPG.

Verifica del checksum

Ora che abbiamo validato le firme del checksum, dobbiamo verificare l'integrità del pacchetto.

Per gli utenti Windows:

certUtil -hashfile tor-0.4.6.10.tar.gz.sha256sum SHA256

Per gli utenti macOS:

shasum -a 256 tor-0.4.6.10.tar.gz.sha256sum

Per utenti BSD/Linux:

sha256sum -c tor-0.4.6.10.tar.gz.sha256sum

Attention: These instructions are meant for using pluggable transports with tor, the network daemon i.e. little-t tor. For instructions on using pluggable transports with Tor Browser, refer to the Tor Browser user manual.

Direct access to the Tor network may sometimes be blocked. Tor can be used with circumvention tools, known as pluggable transports, for getting around these blocks. obfs4, Snowflake and WebTunnel are some pluggable transports available to use with Tor. Tor can be configured to use pluggable transports by modifying Tor's configuration file i.e. torrc.

Steps to configure tor to use pluggable transports for different operating systems are as follows.

  • Download and install tor or the Tor Expert Bundle for your operating system. If access to the Tor Project website is blocked, use an official Tor Project mirror.

  • If you have tor installed, pluggable transport binaries can be downloaded as part of the Tor Expert Bundle. Pluggable transport binaries available as part of the Tor Expert Bundle:

    • lyrebird : implements several pluggable transport protocols, including obfs4 and WebTunnel.
    • snowflake-client : implements the Snowflake pluggable transport.
  • Extract the Tor Expert Bundle to a directory of your choice.

  • For pluggable transports, obfs4 and WebTunnel, obtain bridges from the bridges website, via Email or via Telegram.

  • Modify Tor's configuration file, i.e. torrc. Copy and modify the following sample torrc according to the operating system. If you have installed little-t tor on Linux, you will have to modify the default torrc.

Configuring tor to use obfs4 or WebTunnel

UseBridges 1
# Uncomment the line below for Windows and include the path to the pluggable transport executable (Example: C:\Users\user\Downloads\tor\pluggable_transports\lyrebird.exe)
#ClientTransportPlugin meek_lite,obfs4,webtunnel exec <path-of-executable>

# Uncomment the line below for macOS and include the path to the pluggable transport executable (Example: /Users/user/Downloads/tor/pluggable_transports/lyrebird)
#ClientTransportPlugin meek_lite,obfs4,webtunnel exec <path-of-executable>

# Uncomment the line below for Linux and include the path to the pluggable transport executable (Example: /home/user/Downloads/tor/pluggable_transports/lyrebird)
#ClientTransportPlugin meek_lite,obfs4,webtunnel exec <path-of-executable>

Bridge obfs4 <IP ADDRESS>:<PORT> <FINGERPRINT> cert=<CERTIFICATE> iat-mode=0
Bridge webtunnel <IP ADDRESS>:<PORT> <FINGERPRINT> url=<URL> ver=0.0.1

Configuring tor to use Snowflake

UseBridges 1
# Uncomment the line below for Windows and include the path to the pluggable transport executable (Example: C:\username\Browser\TorBrowser\tor\pluggable_transports\snowflake-client.exe)
#ClientTransportPlugin snowflake exec <path-of-executable>

# Uncomment the line below for macOS and include the path to the pluggable transport executable (Example: /Users/user/Downloads/tor/pluggable_transports/snowflake-client)
#ClientTransportPlugin snowflake exec <path-of-executable>

# Uncomment the line below for Linux and include the path to the pluggable transport executable (Example: /home/user/Downloads/tor/pluggable_transports/snowflake-client)
#ClientTransportPlugin snowflake exec <path-of-executable>

Bridge snowflake 192.0.2.3:80 2B280B23E1107BB62ABFC40DDCC8824814F80A72 fingerprint=2B280B23E1107BB62ABFC40DDCC8824814F80A72 url=https://1098762253.rsc.cdn77.org front=www.phpmyadmin.net,cdn.zk.mk ice=stun:stun.antisip.com:3478,stun:stun.epygi.com:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.mixvoip.com:3478,stun:stun.nextcloud.com:3478,stun:stun.bethesda.net:3478,stun:stun.nextcloud.com:443 utls-imitate=hellorandomizedalpn
  • Save the torrc file.

  • Run tor from the command line: ./tor -f torrc

  • Note: If you have installed little-t tor on Linux and modified the default torrc, you will have to restart the daemon.

Troubleshooting

  • If Tor fails to connect, check that the torrc file is correctly formatted.
  • If tor is installed from the Tor Expert Bundle ensure the torrc file is in the same folder as the tor binary.
  • Check the Tor logs for errors.
  • After exhausting these common troubleshooting steps, if the connection still fails, the bridges you received may be offline or blocked. Obtain new set of bridges from the bridges website, via Email or via Telegram.