1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-04 10:34:49 +02:00
dockerfiles/tor/README.md

99 lines
2.7 KiB
Markdown
Raw Normal View History

2015-06-18 12:43:03 +02:00
tor
===
2015-09-28 07:30:31 +02:00
![](https://badge.imagelayers.io/vimagick/tor:latest.svg)
2015-06-18 12:43:03 +02:00
[`Tor`][1] is free software and an open network that helps you defend against
traffic analysis, a form of network surveillance that threatens personal
freedom and privacy, confidential business activities and relationships, and
state security.
- Tor prevents people from learning your location or browsing habits.
- Tor is for web browsers, instant messaging clients, and more.
- Tor is free and open source for Windows, Mac, Linux/Unix, and Android
2015-09-28 09:33:24 +02:00
ServerTransportPlugin:
- [x] fte
2015-10-27 04:51:45 +02:00
- [x] meek
2015-09-28 09:33:24 +02:00
- [x] obfs3
- [x] obfs4
2015-06-18 12:43:03 +02:00
## docker-compose.yml
```
tor:
image: vimagick/tor
ports:
2015-10-27 05:36:06 +02:00
# - "7002:7002"
2015-06-18 12:43:03 +02:00
- "9001:9001"
2015-09-28 09:41:16 +02:00
# volumes:
# - ./torrc:/etc/tor/torrc
2015-10-27 05:36:06 +02:00
# - ./cert.pem:/var/lib/tor/cert.pem
# - ./key.pem:/var/lib/tor/key.pem
2015-06-18 12:43:03 +02:00
restart: always
```
2015-10-27 05:36:06 +02:00
> Default `torrc` is for `obfs4`.
> Uncomment lines to use `meek`.
2015-09-28 09:41:16 +02:00
2015-06-18 14:30:05 +02:00
## torrc (server)
2015-06-18 12:43:03 +02:00
```
BridgeRelay 1
2016-05-01 03:06:20 +02:00
ContactInfo noreply@easypi.info
2015-09-28 10:16:22 +02:00
DataDirectory /var/lib/tor
2015-10-27 05:25:12 +02:00
Exitpolicy reject *:*
2016-06-05 16:04:32 +02:00
Nickname easypi
2015-10-27 05:25:12 +02:00
ORPort 9001
PublishServerDescriptor 0
SocksPort 0
2015-09-28 09:33:24 +02:00
#ServerTransportPlugin fte exec /usr/bin/fteproxy --mode server --managed
2015-10-27 04:57:37 +02:00
#ServerTransportPlugin meek exec /usr/bin/meek-server --port 7002 --cert cert.pem --key key.pem
2015-09-28 09:33:24 +02:00
#ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
2015-06-18 14:30:05 +02:00
```
## torrc (client)
```
#Socks5Proxy 127.0.0.1:1080
UseBridges 1
2015-10-27 04:51:45 +02:00
#Bridge fte 1.2.3.4:9001 F24BF4DE74649E205A8A3621C84F97FF623B2083
2016-05-01 03:06:20 +02:00
#Bridge meek 1.2.3.4:9001 url=https://meek.easypi.info:7002/
2015-09-28 09:33:24 +02:00
#Bridge obfs3 1.2.3.4:9001 F24BF4DE74649E205A8A3621C84F97FF623B2083
Bridge obfs4 1.2.3.4:9001 F24BF4DE74649E205A8A3621C84F97FF623B2083
2015-10-27 09:18:20 +02:00
#ClientTransportPlugin fte exec /usr/local/bin/fteproxy
#ClientTransportPlugin meek exec /usr/local/bin/meek-client
#ClientTransportPlugin obfs3 exec /usr/local/bin/obfsproxy
ClientTransportPlugin obfs4 exec /usr/local/bin/obfs4proxy
2015-06-18 12:43:03 +02:00
```
2015-10-27 09:40:56 +02:00
> Please connect via `HTTPProxy`/`HTTPSProxy`/`Socks5Proxy` if you're blocked!
2015-06-18 14:30:05 +02:00
## server
2015-06-18 12:43:03 +02:00
```
2016-05-01 03:06:20 +02:00
$ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/C=JP/ST=Tokyo/L=Heiwajima/O=DataGeek/OU=Org/CN=meek.easypi.info"
2015-06-18 12:43:03 +02:00
$ docker-compose up -d
2015-06-18 14:30:05 +02:00
$ docker-compose logs
2016-06-05 16:04:32 +02:00
$ docker-compose exec tor tor --quiet --list-fingerprint
easypi F24B F4DE 7464 9E20 5A8A 3621 C84F 97FF 623B 2083
2015-06-18 12:43:03 +02:00
```
2015-06-18 14:30:05 +02:00
## client
```
$ tor -f /etc/tor/torrc
2015-09-28 09:33:24 +02:00
$ curl -x socks5h://127.0.0.1:9050 ifconfig.ovh
2015-06-18 14:30:05 +02:00
```
2015-06-18 13:49:42 +02:00
2015-06-18 14:30:05 +02:00
## references
2015-06-18 13:49:42 +02:00
2015-06-18 14:30:05 +02:00
- https://www.torproject.org/projects/obfsproxy-debian-instructions.html.en
2015-10-27 05:36:06 +02:00
- https://blog.torproject.org/blog/how-use-%E2%80%9Cmeek%E2%80%9D-pluggable-transport
2015-09-28 09:33:24 +02:00
- https://fteproxy.org/help-server-with-tor
- https://github.com/Yawning/obfs4
2015-06-18 14:41:36 +02:00
[1]: https://www.torproject.org/