Skip to content

Commit

Permalink
update v4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed Feb 8, 2025
1 parent 6dda92d commit 62f2fcf
Show file tree
Hide file tree
Showing 6 changed files with 324 additions and 107 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build-v4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build-v3

on:
workflow_dispatch:
schedule:
- cron: '0 6 */6 * *'
push:
branches:
- "master"
paths:
- ".github/workflows/build-v4.yml"
- "dev/v4/Dockerfile"
- "dev/v4/entrypoint.sh"

jobs:
build-v4:
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push v3 file
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:dev/v4"
file: Dockerfile
push: true
platforms: linux/amd64, linux/arm64, linux/s390x, linux/arm, linux/ppc64le, linux/riscv64
tags: ${{ secrets.DOCKERHUB_USERNAME }}/docker-warp-socks:v4
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,31 @@
Multi-platform: `linux/amd64`, `linux/arm64`, `linux/arm`, `linux/ppc64le`, `linux/s390x` and `linux/riscv64`;

## Migrate to v3

- The `v2` version will be kept and available at `monius/docker-warp-socks:v2`.
- The `v3` version will soon be released and available at `monius/docker-warp-socks:v3` and default in `monius/docker-warp-socks`.
- The `Referral` programme will be concluded on Nov 1st from Cloudflare, the `Plus` flag in `v3` will be unavaible due to it.
- According to the new policy, see `sliver=005-tier1` for `plus` user and `siliver=none` for free account.
- The `v3` version will be based on `alpine 3.20`.

## V3 features

- Support for mixed protocols on the default port `9091`. (https://github.com/Mon-ius/Docker-Warp-Socks/pull/15)
- Networking between containers. (https://github.com/Mon-ius/Docker-Warp-Socks/pull/16)
- More secure Bootstrap without `privileged` acquisition in docker container.
## V4 Features
- Rich support for most linux family systems, including `arm`, `ppc64le`, `s390x` and `riscv64`, etc.
- Light start without `NET_ADMIN`, `SYS_MODULE`, `/lib/modules`, and extra `net` deps.
- Migration of core components from `Dante` and `ViRb3/wgcf` to `SagerNet/sing-box`.
- Support `linux/ppc64le` and `linux/riscv64` in addition.
- Used call `Gemini-2.0-flash-thinking-exp-1219` API.
- Used call `OpenAI-o1-pro` API.
- More secure Bootstrap without `privileged` acquisition in docker container.
- Support lastest `SagerNet/sing-box` v1.11.x version with `action` feature enabled.
- Support for mixed `http`, `https`, and `socks` protocols on the default port `9091`
- Light core with alpine linux `3.21`.
- Easy networking between containers.
- Used call `Gemini-2.0-flash-thinking-exp-0121` API.
- Used call `OpenAI-o3`, `OpenAI-o3-mini`, `OpenAI-o1-pro` and `OpenAI-Sora` API.
- Used call `Anthropic Claude 3.5 Sonnet v2` API.
- Used call `DeepSeek V3` and `DeepSeek R1` API.

## Migrate to v4
- The `v2` version will be kept and available at `monius/docker-warp-socks:v2`.
- The `v3` version will be kept and available at `monius/docker-warp-socks:v3`.
- The `v4` version will soon be released and available at `monius/docker-warp-socks:v4` and default in `monius/docker-warp-socks`.
- The `Referral` programme has been closed, there is no `Plus` flag anymore.

Quick start from:
```sh
docker run --restart=always -itd \
--name warp_socks_v3 \
--name warp_socks_v4 \
-p 9091:9091 \
monius/docker-warp-socks:v3
monius/docker-warp-socks:v4
```

Then, verify on host with:
Expand All @@ -58,7 +57,7 @@ docker run --restart=always -itd \
-e WARP_LICENSE=$WARP_LICENSE \
-e NET_PORT=9091 \
-p 9091:9091 \
monius/docker-warp-socks:v3
monius/docker-warp-socks:v4
```

Check if both `siliver=xxx-xxx` and `warp=on` shown from:
Expand Down
2 changes: 1 addition & 1 deletion dev/v3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL maintainer="M0nius <m0niusplus@gmail.com>" \
org.opencontainers.image.description="Connet to CloudFlare WARP, exposing `socks5` proxy all together." \
org.opencontainers.image.authors="M0nius <m0niusplus@gmail.com>" \
org.opencontainers.image.vendor="M0nius Acc" \
org.opencontainers.image.version="2.0.0" \
org.opencontainers.image.version="3.0.0" \
org.opencontainers.image.url="https://hub.docker.com/r/monius/docker-warp-socks" \
org.opencontainers.image.source="https://github.com/Mon-ius/Docker-Warp-Socks" \
org.opencontainers.image.base.name="docker.io/monius/docker-warp-socks"
Expand Down
148 changes: 62 additions & 86 deletions dev/v3/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WARP_SERVER="${WARP_SERVER:-$_WARP_SERVER}"
WARP_PORT="${WARP_PORT:-$_WARP_PORT}"
NET_PORT="${NET_PORT:-$_NET_PORT}"

RESPONSE=$(curl -fsSL bit.ly/warp_socks | sh -s -- $WARP_LICENSE)
RESPONSE=$(curl -fsSL bit.ly/warp_socks | sh -s -- "$WARP_LICENSE")
private_key=$(echo "$RESPONSE" | sed -n 's/.*"private_key":"\([^"]*\)".*/\1/p')
ipv4=$(echo "$RESPONSE" | sed -n 's/.*"v4":"\([^"]*\)".*/\1/p')
ipv6=$(echo "$RESPONSE" | sed -n 's/.*"v6":"\([^"]*\)".*/\1/p')
Expand All @@ -34,6 +34,25 @@ else
AUTH_PART=""
fi

PROXY_PART=$(cat <<EOF
{
"tag": "Proxy",
"type": "wireguard",
"server": "$WARP_SERVER",
"server_port": $WARP_PORT,
"local_address": [
"${ipv4}/32",
"${ipv6}/128"
],
"private_key": "$private_key",
"peer_public_key": "$public_key",
"reserved": $reserved_dec,
"mtu": 1408,
"udp_fragment": true
}
EOF
)

cat <<EOF | tee /etc/sing-box/config.json
{
"log": {
Expand All @@ -49,43 +68,41 @@ cat <<EOF | tee /etc/sing-box/config.json
"store_fakeip": true
}
},
"outbounds": [
{
"tag": "direct-out",
"type": "direct",
"udp_fragment": true
},
{
"type": "dns",
"tag": "dns-out"
},
{
"type": "block",
"tag": "block"
},
$PROXY_PART
],
"dns": {
"servers": [
{
"tag": "google",
"address": "tls://8.8.8.8",
"detour": "WARP"
},
{
"tag": "fallback",
"address": "8.8.8.8",
"address_resolver": "google",
"detour": "WARP"
},
{
"tag": "local-dns",
"address": "223.5.5.5",
"detour": "direct"
},
{
"tag": "block-dns",
"address": "rcode://success"
}
],
"rules": [
{
"outbound": "any",
"server": "local-dns"
"tag": "ND-h3",
"address": "h3://dns.nextdns.io/x",
"address_resolver": "dns-direct",
"detour": "direct-out"
},
{
"query_type": [
"A"
],
"rewrite_ttl": 1,
"server": "fallback"
"tag": "dns-direct",
"address": "udp://223.5.5.5",
"detour": "direct-out"
}
],
"strategy": "ipv4_only"
"strategy": "ipv4_only",
"final": "ND-h3",
"reverse_mapping": true,
"disable_cache": false,
"disable_expire": false
},
"route": {
"rules": [
Expand All @@ -94,62 +111,27 @@ cat <<EOF | tee /etc/sing-box/config.json
"outbound": "dns-out"
},
{
"port": 53,
"outbound": "dns-out"
"ip_is_private": true,
"outbound": "direct-out"
},
{
"type": "logical",
"mode": "or",
"rules": [
{
"port": 853
},
{
"network": "udp",
"port": 443
},
{
"protocol": "stun"
}
"ip_cidr": [
"0.0.0.0/8",
"10.0.0.0/8",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.168.0.0/16",
"224.0.0.0/4",
"240.0.0.0/4",
"52.80.0.0/16"
],
"outbound": "block"
},
{
"ip_is_private": true,
"outbound": "direct"
"outbound": "direct-out"
}
],
"auto_detect_interface": true,
"final": "WARP"
"final": "Proxy"
},
"outbounds": [
{
"tag": "WARP",
"type": "wireguard",
"server": "$WARP_SERVER",
"server_port": $WARP_PORT,
"local_address": [
"${ipv4}/32",
"${ipv6}/128"
],
"private_key": "$private_key",
"peer_public_key": "$public_key",
"reserved": $reserved_dec,
"mtu": 1408
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "dns",
"tag": "dns-out"
},
{
"type": "block",
"tag": "block"
}
],
"inbounds": [
{
"type": "mixed",
Expand All @@ -158,12 +140,6 @@ cat <<EOF | tee /etc/sing-box/config.json
"listen_port": $NET_PORT,
$AUTH_PART
"sniff": true
},
{
"type": "direct",
"listen": "::",
"listen_port": 53,
"sniff": true
}
]
}
Expand Down
23 changes: 23 additions & 0 deletions dev/v4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM alpine:3.21

LABEL maintainer="M0nius <m0niusplus@gmail.com>" \
alpine-version="3.21.0" \
org.opencontainers.image.title="Docker-Warp-Socks" \
org.opencontainers.image.description="Connet to CloudFlare WARP, exposing `socks5` proxy all together." \
org.opencontainers.image.authors="M0nius <m0niusplus@gmail.com>" \
org.opencontainers.image.vendor="M0nius Acc" \
org.opencontainers.image.version="4.0.0" \
org.opencontainers.image.url="https://hub.docker.com/r/monius/docker-warp-socks" \
org.opencontainers.image.source="https://github.com/Mon-ius/Docker-Warp-Socks" \
org.opencontainers.image.base.name="docker.io/monius/docker-warp-socks"

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 openssl sing-box \
&& rm -rf /var/cache/apk/*

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

CMD ["rws-cli"]
Loading

0 comments on commit 62f2fcf

Please sign in to comment.