dependabot[bot] 4bdd61e3b2 build(deps): bump docker/build-push-action from 2.6.1 to 2.7.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.6.1 to 2.7.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.6.1...v2.7.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-27 08:05:44 +00:00
2021-07-07 18:28:12 +02:00
2021-03-03 13:48:47 +01:00

docker: tor socks & dns proxy 🌐 🐳

Docker Hub: https://hub.docker.com/r/fphammerle/tor-proxy

Signed image tags: https://github.com/fphammerle/docker-tor-proxy/tags

$ sudo docker run --rm --name tor_proxy \
    -p 127.0.0.1:9050:9050/tcp \
    -p 127.0.0.1:53:9053/udp \
    fphammerle/tor-proxy

or after cloning the repository 🐙

$ sudo docker-compose up

Test Proxies

$ curl --proxy socks5h://localhost:9050 ipinfo.io
$ torsocks wget -O - ipinfo.io
$ torsocks lynx -dump https://check.torproject.org/
$ dig @localhost fabian.hammerle.me
$ ssh -o 'ProxyCommand nc -x localhost:9050 -v %h %p' abcdefghi.onion
# no anonymity!
$ chromium-browser --proxy-server=socks5://localhost:9050 ipinfo.io

Read-only Root Filesystem

Optionally add

$ sudo docker run --read-only -v tor_proxy_data:/var/lib/tor --tmpfs /tmp:rw,size=4k`

to make the container's root filesystem read-only.

Isolate Host

sudo iptables -A OUTPUT ! -o lo -j REJECT --reject-with icmp-admin-prohibited

Change SocksTimeout Option

$ sudo docker run -e SOCKS_TIMEOUT_SECONDS=60

Exclude Exit Nodes

$ sudo docker run -e EXCLUDE_EXIT_NODES=1.2.3.4,1.2.3.5 …

Show Circuits

$ printf 'AUTHENTICATE\nGETINFO circuit-status\nQUIT\n' \
    | sudo docker exec -i tor_proxy nc localhost 9051

relay search: https://metrics.torproject.org/rs.html

or using onioncircuits (debian repo):

$ sudo apt-get install --no-install-recommends onioncircuits
$ sudo nsenter --target "$(sudo docker inspect --format='{{.State.Pid}}' tor_proxy)" --net \
    sudo -u $USER onioncircuits

Troubleshooting

Disable SafeLogging (temporarily) to log IP addresses instead of [scrubbed]:

$ printf 'AUTHENTICATE\nSETCONF SafeLogging=0\nGETCONF SafeLogging\nQUIT\n' \
    | sudo docker exec -i tor_proxy nc localhost 9051
S
Description
tor socks & dns proxy 🌐 🐳 🐙
Readme 469 KiB
Languages
Dockerfile 57.2%
Shell 42.8%