47 lines
2.6 KiB
Docker
47 lines
2.6 KiB
Docker
FROM debian:bookworm-slim
|
|
|
|
LABEL description="dante SOCKS5 + purevpn-cli exit node"
|
|
|
|
# ── System dependencies (all in one layer so apt cache is fresh for installer) ─
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
dante-server \
|
|
curl wget ca-certificates \
|
|
iproute2 iptables iputils-ping \
|
|
netcat-openbsd procps dnsutils \
|
|
expect \
|
|
openvpn wireguard wireguard-tools \
|
|
net-tools openresolv \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# ── Install purevpn-cli ───────────────────────────────────────────────────────
|
|
# Pre-installing its dependencies above means the installer's own apt calls
|
|
# find everything already present and skip cleanly.
|
|
# Binary lands at /opt/purevpn-cli/bin/purevpn-cli
|
|
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
|
|
|
|
# ── Fake sudo wrapper ─────────────────────────────────────────────────────────
|
|
# purevpn-cli calls `sudo purevpn-cli --connect X --install-missing-components`
|
|
# which crashes in its own pkg/Node.js bootstrap when that flag combination is
|
|
# run through pkg's argument parser (bug in the CLI).
|
|
# Fix: strip --install-missing-components and run the real command as-is.
|
|
# We are already root in Docker so the re-run won't trigger sudo again.
|
|
RUN printf '#!/bin/bash\nnew=(); for a in "$@"; do [[ "$a" == "--install-missing-components" ]] && continue; new+=("$a"); done\nexec "${new[@]}"\n' \
|
|
> /usr/local/bin/sudo && chmod +x /usr/local/bin/sudo
|
|
|
|
# ── PATH: installer puts binary in /opt/purevpn-cli/bin/ ─────────────────────
|
|
ENV PATH=/opt/purevpn-cli/bin:/opt/purevpn-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
# ── 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"]
|