warp-proxy/entrypoint.sh

16 lines
379 B
Bash
Raw Normal View History

2021-06-19 20:39:18 +00:00
#!/bin/bash
(
2021-06-19 21:52:29 +00:00
while ! warp-cli --accept-tos register; do
2021-06-19 20:39:18 +00:00
sleep 1
>&2 echo "Awaiting warp-svc become online..."
done
2021-06-19 21:52:29 +00:00
warp-cli --accept-tos set-mode proxy
2023-04-10 15:13:09 +00:00
warp-cli --accept-tos set-proxy-port 40001
2021-06-19 21:52:29 +00:00
warp-cli --accept-tos connect
2023-04-10 15:15:54 +00:00
socat TCP-LISTEN:40000,fork TCP:localhost:40001 # socat is used to redirect traffic from 40000 to 40001
2021-06-19 20:39:18 +00:00
) &
exec warp-svc
2021-12-13 06:32:33 +00:00
warp-cli enable-always-on