Finished support for hidden services and demo web app

This commit is contained in:
AntiTree 2016-07-28 21:33:01 -04:00
parent b743794397
commit 20d02fd326
2 changed files with 15 additions and 1 deletions

View File

@ -78,12 +78,22 @@ services:
- "80"
environment:
ROLE: HS
# This will create a hidden service that points to
# the service "web" which is runing nginx. You can
# change this to whatever ip or hostname you want
TOR_HS_PORT: "80"
TOR_HS_ADDR: "127.0.0.1"
TOR_HS_ADDR: "web"
volumes:
- ./tor:/tor
depends_on:
- da1
- da2
- da3
links:
- web
web:
image: nginx
expose:
- "80"

View File

@ -68,6 +68,10 @@ if [ ! -e /tor-config-done ]; then
echo -e "SOCKSPort 0.0.0.0:9050" >> /etc/tor/torrc
;;
HS)
# NOTE By default the HS role will point to a service running on port 80
# but there is no service running on port 80. You can either attach to
# the container and start one, or better yet, point to another docker
# container on the network by setting the TOR_HS_ADDR to its IP
echo "Setting role to HIDDENSERVICE"
echo -e "HiddenServiceDir ${TOR_DIR}/${TOR_NICKNAME}/hs" >> /etc/tor/torrc
if [ -z "${TOR_HS_PORT}" ]; then