Browse Source

Wire up Tor hidden service

node-red
Luke Childs 3 years ago
parent
commit
5ddb838da0
  1. 6
      apps/node-red/docker-compose.yml
  2. 4
      scripts/configure
  3. 2
      templates/.env-sample
  4. 4
      templates/torrc-apps-3-sample

6
apps/node-red/docker-compose.yml

@ -6,12 +6,13 @@ services:
restart: on-failure
stop_grace_period: 1m
ports:
- 1880:1880
- "${APP_NODE_RED_PORT}:${APP_NODE_RED_PORT}"
volumes:
- ${APP_DATA_DIR}/data:/data
- ${LND_DATA_DIR}:/lnd:ro
- ${BITCOIN_DATA_DIR}:/bitcoin:ro
environment:
PORT: $APP_NODE_RED_PORT
BITCOIN_NETWORK: $BITCOIN_NETWORK
BITCOIN_IP: $BITCOIN_IP
BITCOIN_RPC_PORT: $BITCOIN_RPC_PORT
@ -22,3 +23,6 @@ services:
ELECTRUM_IP: $ELECTRUM_IP
ELECTRUM_PORT: $ELECTRUM_PORT
APP_DOMAIN: $APP_DOMAIN
networks:
default:
ipv4_address: $APP_NODE_RED_IP

4
scripts/configure

@ -202,6 +202,8 @@ APP_SQUEAKNODE_PORT="12994"
APP_SQUEAKNODE_GRPC_PORT="8994"
APP_SQUEAKNODE_P2P_PORT="8555"
APP_SQUEAKNODE_P2P_TESTNET_PORT="18555"
APP_NODE_RED_IP="10.21.21.57"
APP_NODE_RED_PORT="1880"
# Generate RPC credentials
if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then
@ -401,6 +403,8 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "
sed -i "s/<app-squeaknode-grpc-port>/${APP_SQUEAKNODE_GRPC_PORT}/g" "${template}"
sed -i "s/<app-squeaknode-p2p-port>/${APP_SQUEAKNODE_P2P_PORT}/g" "${template}"
sed -i "s/<app-squeaknode-p2p-testnet-port>/${APP_SQUEAKNODE_P2P_TESTNET_PORT}/g" "${template}"
sed -i "s/<app-node-red-ip>/${APP_NODE_RED_IP}/g" "${template}"
sed -i "s/<app-node-red-port>/${APP_NODE_RED_PORT}/g" "${template}"
done
##########################################################

2
templates/.env-sample

@ -96,3 +96,5 @@ APP_SQUEAKNODE_PORT=<app-squeaknode-port>
APP_SQUEAKNODE_GRPC_PORT=<app-squeaknode-grpc-port>
APP_SQUEAKNODE_P2P_PORT=<app-squeaknode-p2p-port>
APP_SQUEAKNODE_P2P_TESTNET_PORT=<app-squeaknode-p2p-testnet-port>
APP_NODE_RED_IP=<app-node-red-ip>
APP_NODE_RED_PORT=<app-node-red-port>

4
templates/torrc-apps-3-sample

@ -20,3 +20,7 @@ HiddenServicePort 80 <app-squeaknode-ip>:<app-squeaknode-port>
HiddenServiceDir /var/lib/tor/app-squeaknode-p2p
HiddenServicePort <app-squeaknode-p2p-port> <app-squeaknode-ip>:<app-squeaknode-p2p-port>
HiddenServicePort <app-squeaknode-p2p-testnet-port> <app-squeaknode-ip>:<app-squeaknode-p2p-testnet-port>
# node-red Hidden Service
HiddenServiceDir /var/lib/tor/app-node-red
HiddenServicePort 80 <app-node-red-ip>:<app-node-red-port>
Loading…
Cancel
Save