forked from chriswayg/tor-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test with mounted torrc, obfuscated bridge
- Loading branch information
Showing
3 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,20 +13,27 @@ script: | |
|
||
# Test running the container with the commands in the Readme | ||
- docker run -d --init --name=tor_relay_1 -p 9001:9001 --restart=always local-tor-server | ||
- sleep 60 | ||
- sleep 30 | ||
- docker logs tor_relay_1 | ||
- docker stop tor_relay_1 | ||
- docker rm tor_relay_1 | ||
|
||
- docker run -d --init --name=tor_relay_1 -p 9001:9001 -e TOR_NICKNAME=Tor4docker -e [email protected] --restart=always local-tor-server | ||
- sleep 60 | ||
- sleep 30 | ||
- docker logs tor_relay_1 | ||
- docker cp tor_relay_1:/var/lib/tor/keys/secret_id_key ./ | ||
- cat secret_id_key | ||
- docker stop tor_relay_1 | ||
- docker rm tor_relay_1 | ||
|
||
# Also test docker-compose file | ||
- docker run -d --init --name=tor_relay_1 -p 9001:9001 -v $PWD/tests/torrc:/etc/tor/torrc -v $PWD/tests/secret_id_key:/var/lib/tor/keys/secret_id_key --restart=always local-tor-server | ||
- sleep 30 | ||
- docker logs tor_relay_1 | ||
- docker stop tor_relay_1 | ||
- docker rm tor_relay_1 | ||
|
||
# Also test docker-compose file (probably with the previous build on docker hub) | ||
- docker-compose --version | ||
- docker-compose up -d | ||
- docker-compose logs | ||
- docker-compose docker-compose exec -T relay cat /var/lib/tor/fingerprint | ||
- docker-compose exec -T relay cat /var/lib/tor/fingerprint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIICXAIBAAKBgQC/+MYHaTVWjNaYy6MjTSbRKZwZsvvLLGdD/6pCaZwZvIbtCg5F | ||
ygm0b8s1DFDu4qi8sIAqClqm3sxADFOCO7FB20bAErsa/0uxLhk92yTh0IpHMFGx | ||
YbbCI3ZO0S+zur8QNT9CF626YgIz/0LQ1KZIMNbq1iW7vWMHlz2zETsg7wIDAQAB | ||
AoGBAKcYDqZcuQSAyjls5q7PdL4SjcEAvZH3MFtLqhLsgecU5gxk+E9esFvSAvpF | ||
ohyMRXsX1jbBlG4y9224TOfKtVmunGaVb1v1YRn3llWrH7K8QEkvu74xFLS/TD6G | ||
OED/MOs/ytacdZEfQZW500qDYv+o7XzWk7GjkJOHoqwRhaPBAkEA7IJnXl4AGM+P | ||
nFR/jOLkTcK4iUXauTgb5hhNnbQ+9vKY5yfupVpn0XZ3+XMvZySd7J7Pk5y9XR3Z | ||
iCRmrzNPSQJBAM/KxIKmBBljqrHGHrbaOY6venm3NWZwleLjsitkTYIkoXNwGeF1 | ||
rHpPbrXMc6P7LhlvyGEs2ZRoecsk6f4JFncCQD7yulZ4iGgSHnQKXWR/Iyq7L+iB | ||
aiSwFWTZhRb7WWLa0O19SFxEQquSb346NRyrt0i6QB9WsWPuRO6iWZ459tkCQCtm | ||
NlTzR7fl0SkAMDoQqiTbEcGKOmUC7stMs1HMyUN9UxtBNqaYZUXGgWEHKr/9HkvB | ||
xSBGtcsBZy6+rwCX9VECQA1nc+PWg4tAGi+fjF7IwUUv4uM6L9uMugeiMGXIrXhD | ||
2HOcuCjgbG6DYbRjfK0po1Limfvtzq3Ss549vZtTBpk= | ||
-----END RSA PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
### /etc/torrc ### | ||
# see /etc/torrc/torrc.default and https://www.torproject.org/docs/tor-manual.html.en | ||
|
||
# Server's public IP Address (usually automatic) | ||
#Address 10.10.10.10 | ||
|
||
# Port to advertise for incoming Tor connections. | ||
# common ports are 9001, 443 | ||
ORPort 9001 | ||
|
||
# Mirror directory information for others (optional) | ||
# common ports are 9030, 80 | ||
DirPort 9030 | ||
|
||
# Run as a relay only (not as an exit node) | ||
ExitPolicy reject *:* # no exits allowed | ||
|
||
# Set limits | ||
RelayBandwidthRate 1024 KB # Throttle traffic to | ||
RelayBandwidthBurst 2048 KB # But allow bursts up to | ||
MaxMemInQueues 512 MB # Limit Memory usage to | ||
|
||
# Run Tor as obfuscated bridge | ||
# https://trac.torproject.org/projects/tor/wiki/doc/PluggableTransports/obfs4proxy | ||
ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy | ||
ServerTransportListenAddr obfs4 0.0.0.0:54444 | ||
ExtORPort auto | ||
BridgeRelay 1 | ||
|
||
# Run Tor only as a server (no local applications) | ||
SocksPort 0 | ||
|
||
# Run Tor as a regular user (do not change this) | ||
User debian-tor | ||
DataDirectory /var/lib/tor | ||
|
||
## If no Nickname or ContactInfo is set, docker-entrypoint will use | ||
## the environment variables to add Nickname/ContactInfo here | ||
Nickname Tor4tests # only use letters and numbers | ||
ContactInfo [email protected] |