pcuenq's picture
pcuenq HF staff
Replace with Docker frontend
0313d6a
raw
history blame
548 Bytes
#!/bin/sh
# start tailscale
echo "Start tailscale"
mkdir -p /tmp/tailscale
/bin/tailscaled --tun=userspace-networking --outbound-http-proxy-listen=localhost:1055 --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock &
HOSTNAME=${SPACE_HOST#"https://"}
/bin/tailscale up --authkey ${TS_AUTHKEY} --hostname=${HOSTNAME} --accept-routes --accept-dns
echo "Tailscale started"
echo
echo "redirect 7860 -> backend through tailscale"
socat TCP4-LISTEN:7860,reuseaddr,fork PROXY:localhost:10.254.0.11:7860,proxyport=1055