mirror of
https://github.com/antitree/private-tor-network
synced 2025-02-26 05:38:47 +00:00
adding support for HS(hiddens service) role
This commit is contained in:
parent
46b6802525
commit
8f52b6c630
@ -72,4 +72,18 @@ services:
|
|||||||
- da1
|
- da1
|
||||||
- da2
|
- da2
|
||||||
- da3
|
- da3
|
||||||
|
hs:
|
||||||
|
image: antitree/private-tor
|
||||||
|
expose:
|
||||||
|
- "80"
|
||||||
|
environment:
|
||||||
|
ROLE: HS
|
||||||
|
TOR_HS_PORT: "80"
|
||||||
|
TOR_HS_ADDR: "127.0.0.1"
|
||||||
|
volumes:
|
||||||
|
- ./tor:/tor
|
||||||
|
depends_on:
|
||||||
|
- da1
|
||||||
|
- da2
|
||||||
|
- da3
|
||||||
|
|
||||||
|
@ -61,12 +61,23 @@ if [ ! -e /tor-config-done ]; then
|
|||||||
echo -e "OrPort ${TOR_ORPORT}" >> /etc/tor/torrc
|
echo -e "OrPort ${TOR_ORPORT}" >> /etc/tor/torrc
|
||||||
echo -e "Dirport ${TOR_DIRPORT}" >> /etc/tor/torrc
|
echo -e "Dirport ${TOR_DIRPORT}" >> /etc/tor/torrc
|
||||||
echo -e "ExitPolicy accept *:*" >> /etc/tor/torrc
|
echo -e "ExitPolicy accept *:*" >> /etc/tor/torrc
|
||||||
echo "Waiting for other DA's to come up..."
|
echo "Waiting for other DA's to come up..."
|
||||||
;;
|
;;
|
||||||
CLIENT)
|
CLIENT)
|
||||||
echo "Setting role to CLIENT"
|
echo "Setting role to CLIENT"
|
||||||
echo -e "SOCKSPort 0.0.0.0:9050" >> /etc/tor/torrc
|
echo -e "SOCKSPort 0.0.0.0:9050" >> /etc/tor/torrc
|
||||||
;;
|
;;
|
||||||
|
HS)
|
||||||
|
echo "Setting role to HIDDENSERVICE"
|
||||||
|
echo -e "HiddenServiceDir ${TOR_DIR}/${TOR_NICKNAME}/hs" >> /etc/tor/torrc
|
||||||
|
if [ -z "${TOR_HS_PORT}" ]; then
|
||||||
|
TOR_HS_PORT=80
|
||||||
|
fi
|
||||||
|
if [ -z "${TOR_HS_ADDR}" ]; then
|
||||||
|
TOR_HS_ADDR=127.0.0.1
|
||||||
|
fi
|
||||||
|
echo -e "HiddenServicePort ${TOR_HS_PORT} ${TOR_HS_ADDR}:${TOR_HS_PORT}" >> /etc/tor/torrc
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Role variable missing"
|
echo "Role variable missing"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user