feat: initial vpndock stack
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.
This commit is contained in:
40
vpn-node/Dockerfile
Normal file
40
vpn-node/Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user