Files
hyapi-server/deployments/openvpn/Dockerfile

26 lines
543 B
Docker
Raw Normal View History

2026-07-23 15:13:49 +08:00
# 戎行专用OpenVPN 客户端 + SOCKS5仅内网代理不接管默认路由
FROM alpine:3.21
RUN apk add --no-cache \
openvpn \
bash \
iproute2 \
microsocks \
curl
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENV VPN_DIR=/vpn \
SOCKS_HOST=0.0.0.0 \
SOCKS_PORT=1080 \
RONGXING_HOST=192.168.3.43
VOLUME ["/vpn"]
EXPOSE 1080
HEALTHCHECK --interval=30s --timeout=5s --start-period=45s --retries=5 \
CMD ip link show tun0 >/dev/null 2>&1 || exit 1
ENTRYPOINT ["/entrypoint.sh"]