File size: 548 Bytes
0313d6a
 
 
 
 
 
29bf34d
 
0313d6a
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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