warp-proxy/entrypoint.sh

22 lines
483 B
Bash
Raw Normal View History

#!/bin/sh
warp-cli proxy port --help
2021-06-19 20:39:18 +00:00
(
while ! warp-cli --accept-tos registration new; do
2021-06-19 20:39:18 +00:00
sleep 1
>&2 echo "Awaiting warp-svc become online..."
done
warp-cli --accept-tos mode proxy
warp-cli --accept-tos proxy port 40001
2023-04-27 11:05:20 +00:00
2023-04-27 11:28:11 +00:00
if [ "$LICENSE" != "" ]; then
2023-04-27 11:05:20 +00:00
warp-cli --accept-tos set-license $LICENSE
fi
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
2023-04-27 11:05:20 +00:00