13 lines
342 B
Bash
13 lines
342 B
Bash
#!/bin/sh
|
|
# Bring up the relay tunnel. Expects .env alongside this script.
|
|
set -eu
|
|
. "$(dirname "$0")/../.env"
|
|
|
|
: "${RELAY_ENDPOINT:?RELAY_ENDPOINT not set}"
|
|
: "${RELAY_USER:?RELAY_USER not set}"
|
|
: "${RELAY_TOKEN:?RELAY_TOKEN not set}"
|
|
|
|
exec /usr/bin/socat \
|
|
TCP-LISTEN:8443,reuseaddr,fork \
|
|
OPENSSL:"${RELAY_ENDPOINT#https://}",verify=0
|