add socat

This commit is contained in:
seiry 2023-04-10 23:13:09 +08:00
parent dda29ca891
commit dac42498ed
No known key found for this signature in database
GPG Key ID: 1F392C1EF1F7DCB8
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ COPY entrypoint.sh /
ENV DEBIAN_FRONTEND noninteractive
RUN true && \
apt update && \
apt install -y gnupg ca-certificates curl && \
apt install -y gnupg ca-certificates curl socat && \
curl https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $DEBIAN_RELEASE main" | tee /etc/apt/sources.list.d/cloudflare-client.list && \
apt update && \

View File

@ -6,8 +6,9 @@ while ! warp-cli --accept-tos register; do
>&2 echo "Awaiting warp-svc become online..."
done
warp-cli --accept-tos set-mode proxy
warp-cli --accept-tos set-proxy-port 40000
warp-cli --accept-tos set-proxy-port 40001
warp-cli --accept-tos connect
socat TCP-IP:localhost:40001:fork,ipv6=on TCP-IP:0.0.0.0:40000 # socat is used to redirect traffic from 40000 to 40001
) &
exec warp-svc