This commit is contained in:
2026-07-23 15:59:00 +08:00
parent 9ab7ba66f3
commit 3bf04be347
19 changed files with 1144 additions and 34 deletions

View File

@@ -1,18 +1,25 @@
# 戎行专用OpenVPN 客户端 + Dante SOCKS5仅内网代理
# 戎行专用OpenVPN 客户端 + microsocks SOCKS5走系统路由/tun0
FROM alpine:3.19 AS socks-builder
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk add --no-cache build-base
WORKDIR /src
COPY third_party/microsocks/ ./
RUN make && strip microsocks
FROM alpine:3.19
# 与业务镜像一致,使用国内 apk 源
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk add --no-cache \
openvpn \
bash \
iproute2 \
dante-server \
curl
COPY --from=socks-builder /src/microsocks /usr/local/bin/microsocks
COPY entrypoint.sh /entrypoint.sh
COPY sockd.conf.template /etc/sockd.conf.template
RUN chmod +x /entrypoint.sh
RUN chmod +x /entrypoint.sh /usr/local/bin/microsocks
ENV VPN_DIR=/vpn \
SOCKS_HOST=0.0.0.0 \