2023-05-11 16:22:01 +00:00
|
|
|
#!/bin/sh
|
2022-08-23 17:59:59 +00:00
|
|
|
|
2023-05-11 16:22:01 +00:00
|
|
|
# Runs two simple services on a single container.
|
|
|
|
# 1) socat: exposes remote RoboSats backend from TOR socks to http//localhost:81.
|
|
|
|
# Every robosat coordinators needs a tor bridge
|
|
|
|
# 2) nginx: does the magic of redirecting every request to either local (the app, static,
|
|
|
|
# languages) or remote (for each coordinator, either API or WS, and static avatar)
|
2022-08-23 17:59:59 +00:00
|
|
|
|
2023-10-27 10:01:59 +00:00
|
|
|
# Every robosat coordinators needs a tor socat bridge.
|
|
|
|
|
2023-11-03 10:53:46 +00:00
|
|
|
###############################
|
2023-11-03 11:42:25 +00:00
|
|
|
# Experimental
|
2023-10-27 10:01:59 +00:00
|
|
|
# Mainnet
|
|
|
|
mainnet_exp_onion=robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion
|
2023-10-27 12:01:13 +00:00
|
|
|
mainnet_exp_port=101
|
2023-10-27 10:01:59 +00:00
|
|
|
# Testnet
|
|
|
|
testnet_exp_onion=robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion
|
2023-10-27 12:01:13 +00:00
|
|
|
testnet_exp_port=1001
|
2023-11-03 10:53:46 +00:00
|
|
|
# socat cmd
|
|
|
|
mainnet_exp_socat="socat tcp4-LISTEN:${mainnet_exp_port},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${TOR_PROXY_IP:-127.0.0.1}:${mainnet_exp_onion}:80,socksport=${TOR_PROXY_PORT:-9050}"
|
|
|
|
testnet_exp_socat="socat tcp4-LISTEN:${testnet_exp_port},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${TOR_PROXY_IP:-127.0.0.1}:${testnet_exp_onion}:80,socksport=${TOR_PROXY_PORT:-9050}"
|
2023-10-27 12:01:13 +00:00
|
|
|
|
2023-11-03 10:53:46 +00:00
|
|
|
################################
|
2023-11-03 11:42:25 +00:00
|
|
|
# Temple of Sats
|
2023-10-27 12:01:13 +00:00
|
|
|
# Mainnet
|
2023-12-02 17:41:47 +00:00
|
|
|
mainnet_temple_onion=ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion
|
2023-10-27 12:01:13 +00:00
|
|
|
mainnet_temple_port=102
|
|
|
|
# Testnet
|
2023-12-02 17:41:47 +00:00
|
|
|
testnet_temple_onion=jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion
|
2023-10-27 12:01:13 +00:00
|
|
|
testnet_temple_port=1002
|
2023-11-03 10:53:46 +00:00
|
|
|
# socat cmd
|
2023-10-27 12:01:13 +00:00
|
|
|
mainnet_temple_socat="socat tcp4-LISTEN:${mainnet_temple_port},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${TOR_PROXY_IP:-127.0.0.1}:${mainnet_temple_onion}:80,socksport=${TOR_PROXY_PORT:-9050}"
|
|
|
|
testnet_temple_socat="socat tcp4-LISTEN:${testnet_temple_port},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${TOR_PROXY_IP:-127.0.0.1}:${testnet_temple_onion}:80,socksport=${TOR_PROXY_PORT:-9050}"
|
|
|
|
|
2023-10-27 10:01:59 +00:00
|
|
|
|
2023-11-03 11:42:25 +00:00
|
|
|
################################
|
|
|
|
# Satstralia
|
|
|
|
# Mainnet
|
|
|
|
mainnet_satstralia_onion=satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion
|
|
|
|
mainnet_satstralia_port=103
|
|
|
|
# Testnet
|
2023-11-14 13:24:45 +00:00
|
|
|
testnet_satstralia_onion=testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion
|
2023-11-03 11:42:25 +00:00
|
|
|
testnet_satstralia_port=1003
|
|
|
|
# socat cmd
|
|
|
|
mainnet_satstralia_socat="socat tcp4-LISTEN:${mainnet_satstralia_port},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${TOR_PROXY_IP:-127.0.0.1}:${mainnet_satstralia_onion}:80,socksport=${TOR_PROXY_PORT:-9050}"
|
|
|
|
testnet_satstralia_socat="socat tcp4-LISTEN:${testnet_satstralia_port},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${TOR_PROXY_IP:-127.0.0.1}:${testnet_satstralia_onion}:80,socksport=${TOR_PROXY_PORT:-9050}"
|
|
|
|
|
|
|
|
|
2023-11-03 10:53:46 +00:00
|
|
|
# RUN!
|
2023-11-03 11:42:25 +00:00
|
|
|
$mainnet_exp_socat & $testnet_exp_socat & $mainnet_temple_socat & $testnet_temple_socat & $mainnet_satstralia_socat & $testnet_satstralia_socat& nginx
|