2021-09-18 12:03:21 +02:00
|
|
|
|
# Tor-socks-proxy
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
<div align="center">
|
|
|
|
|
<img src="https://i.ibb.co/LJxkggb/tor-socks-proxy.png" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
## Descrizione
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
|
|
|
|
[![Sito ufficiale](https://img.shields.io/static/v1.svg?color=555555&logoColor=ffffff&logo=firefoxbrowser&style=flat&label=&message=Homepage)](https://www.torproject.org/) [![Sorgente](https://img.shields.io/static/v1.svg?color=555555&logoColor=ffffff&logo=github&style=flat&label=&message=Sorgente)](https://github.com/PeterDaveHello/tor-socks-proxy) [![Docker Hub](https://img.shields.io/static/v1.svg?color=555555&logoColor=ffffff&logo=docker&style=flat&label=&message=Docker Hub)](https://hub.docker.com/r/peterdavehello/tor-socks-proxy/) [![Docs](https://img.shields.io/static/v1.svg?color=555555&logoColor=ffffff&logo=readthedocs&style=flat&label=&message=Docs)](https://2019.www.torproject.org/docs/tor-manual.html)
|
2021-09-18 12:03:21 +02:00
|
|
|
|
|
|
|
|
|
Tor-socks-proxy è un [server proxy](https://wikiless.org/wiki/Proxy_server) SOCKS5 per rimanere il più possibile "anonimi" su internet:
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-11-04 08:53:03 +01:00
|
|
|
|
- Immagine leggera, pesa solo 10mb sul disco
|
2021-09-18 12:03:21 +02:00
|
|
|
|
- Essendo [SOCKS5](https://wikiless.org/wiki/SOCKS#SOCKS5) è abbastanza sicuro pur rimanendo veloce
|
2021-11-04 08:53:03 +01:00
|
|
|
|
- Si può praticamente usare su ogni sistema operativo, browser, dispositivo mobile, etc...
|
2021-09-18 12:03:21 +02:00
|
|
|
|
|
|
|
|
|
## Struttura file e cartelle
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
```
|
|
|
|
|
/home/
|
|
|
|
|
└── docker/
|
|
|
|
|
└── tor-socks-proxy/
|
|
|
|
|
├── .env
|
|
|
|
|
├── docker-compose.yml
|
|
|
|
|
└── torrc
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-12 15:57:16 +01:00
|
|
|
|
- `.env` - file contenenti le variabili environment per il docker-compose
|
|
|
|
|
- `docker-compose.yml` - file usato per creare il container
|
|
|
|
|
- `torrc` - file di configurazione di tor
|
2021-09-18 12:03:21 +02:00
|
|
|
|
|
2021-11-22 10:23:03 +01:00
|
|
|
|
**N.B. Tutti i file e le cartelle devono essere creati a mano**
|
2021-09-18 12:03:21 +02:00
|
|
|
|
|
|
|
|
|
## Esempi
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
Semplice esempio per iniziare ad usare subito il container
|
|
|
|
|
|
|
|
|
|
### network
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2022-02-21 09:44:18 +01:00
|
|
|
|
Con docker
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
```bash
|
|
|
|
|
docker network create custom-bridge
|
|
|
|
|
```
|
2021-10-28 15:35:15 +02:00
|
|
|
|
|
2022-02-21 09:44:18 +01:00
|
|
|
|
oppure usando podman
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
```bash
|
|
|
|
|
podman network create custom-bridge
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### docker-compose
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
`docker-compose.yml`
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
```yml
|
|
|
|
|
version: "3.8"
|
|
|
|
|
services:
|
|
|
|
|
tor-socks-proxy:
|
|
|
|
|
container_name: tor-socks-proxy
|
|
|
|
|
image: peterdavehello/tor-socks-proxy
|
|
|
|
|
networks:
|
|
|
|
|
- custom-bridge
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
ports:
|
|
|
|
|
- ${TOR_SOCKS_PORT:-9150}:9150/tcp
|
|
|
|
|
env_file: .env
|
|
|
|
|
volumes:
|
2021-09-18 12:07:29 +02:00
|
|
|
|
- ${TORRC_FILE:-/home/docker/tor-socks-proxy/torrc}:/etc/tor/torrc
|
2021-09-18 12:03:21 +02:00
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
custom-bridge:
|
|
|
|
|
name: custom-bridge
|
|
|
|
|
driver: bridge
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
`.env`
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
```bash
|
|
|
|
|
# Generale
|
2021-09-18 12:07:29 +02:00
|
|
|
|
TORRC_FILE=/home/docker/tor-socks-proxy/torrc
|
2021-09-18 12:03:21 +02:00
|
|
|
|
TOR_SOCKS_PORT=9150
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
`torrc`
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
```bash
|
2021-11-04 08:53:03 +01:00
|
|
|
|
# opzioni personalizzate
|
|
|
|
|
# fonte: https://2019.www.torproject.org/docs/tor-manual.html.en
|
2021-09-18 12:03:21 +02:00
|
|
|
|
CookieAuthentication 1
|
|
|
|
|
AvoidDiskWrites 1
|
|
|
|
|
GuardLifetime 1 days
|
|
|
|
|
ConnectionPadding 1
|
|
|
|
|
ClientOnly 1
|
|
|
|
|
GeoIPExcludeUnknown 1
|
2022-01-27 11:05:00 +01:00
|
|
|
|
ExitPolicy reject *:*
|
|
|
|
|
BridgeRelay 0
|
2021-11-04 08:53:03 +01:00
|
|
|
|
# five eyes e derivati
|
2022-01-27 11:05:00 +01:00
|
|
|
|
# fonte: https://web.archive.org/web/20211221142643/https://privacyguides.org/providers/#ukusa | https://wikiless.org/wiki/Five_Eyes
|
2021-09-18 12:03:21 +02:00
|
|
|
|
ExcludeNodes {IT}, {GB}, {CA}, {US}, {AU}, {NZ}, {NL}, {FR}, {DK}, {NO}, {SE}, {CN}, {IN}, {RU}, {IE}, {AG}
|
|
|
|
|
|
2021-11-04 08:53:03 +01:00
|
|
|
|
# opzioni di default
|
|
|
|
|
# fonte: https://raw.githubusercontent.com/PeterDaveHello/tor-socks-proxy/master/torrc
|
2021-09-18 12:03:21 +02:00
|
|
|
|
HardwareAccel 1
|
|
|
|
|
Log notice stdout
|
|
|
|
|
DNSPort 0.0.0.0:8853
|
|
|
|
|
SocksPort 0.0.0.0:9150
|
|
|
|
|
DataDirectory /var/lib/tor
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Reverse proxy
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-10-28 15:35:15 +02:00
|
|
|
|
Vedi [Todo](#Todo)
|
2021-09-18 12:03:21 +02:00
|
|
|
|
|
|
|
|
|
## Aggiornamento
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
### Automatico
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
Usando [watchtower](../watchtower) il container si aggiorna automaticamente
|
|
|
|
|
|
|
|
|
|
### Manuale
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-10-28 15:35:15 +02:00
|
|
|
|
1. `docker-compose up -d`
|
|
|
|
|
2. `docker image prune`
|
2021-09-18 12:03:21 +02:00
|
|
|
|
|
|
|
|
|
## Backup e ripristino
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-09-18 12:03:21 +02:00
|
|
|
|
### Backup
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-11-02 11:20:09 +01:00
|
|
|
|
Usate [borg](../borg) per fare i backup giornalieri dell'intera cartella `tor-socks-proxy`
|
2021-09-18 12:03:21 +02:00
|
|
|
|
|
|
|
|
|
### Ripristino
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2021-11-02 11:20:09 +01:00
|
|
|
|
Per una maggiore spiegazione sui passaggi da fare, controllate [qua](../borg#user-content-controllare-la-cartella-dei-backup)
|
2021-11-12 15:57:16 +01:00
|
|
|
|
|
2022-02-21 09:44:18 +01:00
|
|
|
|
1. fermare il container con `docker-compose down`
|
2021-09-18 12:03:21 +02:00
|
|
|
|
2. cancellare l'intera cartella `tor-socks-proxy`
|
|
|
|
|
3. dal backup copiare la cartella `tor-socks-proxy`
|
2022-02-21 09:44:18 +01:00
|
|
|
|
4. far ripartire il container con `docker-compose up -d`
|
2021-09-18 12:03:21 +02:00
|
|
|
|
|
2021-10-27 15:08:41 +02:00
|
|
|
|
---
|
|
|
|
|
|
2021-11-12 15:57:16 +01:00
|
|
|
|
Licenza: [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt)
|