HAProxy SOCKS5 entry point + scalable purevpn-cli/microsocks exit nodes. Supports up to 10 simultaneous connections (PureVPN limit), random location selection from a predefined pool, and automatic reconnect to an unused location on server-side drop.
41 lines
2.1 KiB
Docker
41 lines
2.1 KiB
Docker
FROM debian:bookworm-slim
|
|
|
|
LABEL description="microsocks + purevpn-cli exit node"
|
|
|
|
# ── System dependencies ───────────────────────────────────────────────────────
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc make git \
|
|
curl wget ca-certificates \
|
|
iproute2 iptables iputils-ping \
|
|
netcat-openbsd procps dnsutils \
|
|
expect \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# ── Install purevpn-cli (official installer) ──────────────────────────────────
|
|
# Running as root inside Docker so no sudo needed.
|
|
RUN curl -fsSL https://apps.purevpn-tools.com/cross-platform/linux-cli/production/cli-install.sh \
|
|
-o /tmp/cli-install.sh \
|
|
&& bash /tmp/cli-install.sh \
|
|
&& rm -f /tmp/cli-install.sh
|
|
|
|
# ── Add purevpn-cli to PATH (as per official docs) ────────────────────────────
|
|
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/etc/pure-linux-cli/
|
|
|
|
# ── Build microsocks from source ──────────────────────────────────────────────
|
|
RUN git clone --depth 1 https://github.com/rofl0r/microsocks.git /tmp/microsocks \
|
|
&& cd /tmp/microsocks \
|
|
&& make \
|
|
&& cp microsocks /usr/local/bin/microsocks \
|
|
&& rm -rf /tmp/microsocks
|
|
|
|
# ── Location list ─────────────────────────────────────────────────────────────
|
|
COPY servers.txt /etc/vpndock/servers.txt
|
|
|
|
# ── Entrypoint ────────────────────────────────────────────────────────────────
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 1080
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|