Skip to content

Commit

Permalink
slim v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed Sep 8, 2024
1 parent 80c3d8d commit 1c1a98e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dev/v3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ LABEL maintainer="M0nius <[email protected]>" \
RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" | tee -a /etc/apk/repositories

RUN apk update && apk upgrade \
&& apk add --no-cache curl sing-box openssl \
&& apk add --no-cache sing-box \
&& sed -i '/alpine\/edge\/testing/d' /etc/apk/repositories \
&& rm -rf /var/cache/apk/*

COPY ./dev/v3/entrypoint.sh /run/entrypoint.sh
COPY entrypoint.sh /run/entrypoint.sh
ENTRYPOINT ["/run/entrypoint.sh"]

CMD ["rws-cli"]
4 changes: 4 additions & 0 deletions dev/v3/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ WARP_SERVER="${WARP_SERVER:-$_WARP_SERVER}"
WARP_PORT="${WARP_PORT:-$_WARP_PORT}"
NET_PORT="${NET_PORT:-$_NET_PORT}"

if [ ! -e "/etc/sing-box/config.json" ]; then
apk update && apk add --no-cache curl openssl
fi

RESPONSE=$(curl -fsSL bit.ly/warp_socks | sh -s)
private_key=$(echo "$RESPONSE" | sed -n 's/.*"private_key":"\([^"]*\)".*/\1/p')
ipv4=$(echo "$RESPONSE" | sed -n 's/.*"v4":"\([^"]*\)".*/\1/p')
Expand Down

0 comments on commit 1c1a98e

Please sign in to comment.