fix: pre-download pured daemon + start it before purevpn-cli
The purevpn-cli binary hardcodes a wrong S3 path for the daemon download which returns HTTP 403. The correct URL (from the installer script) is: /cross-platform/linux-daemon/1.4.1/pured-linux-x64.gz purevpn-cli is a client that talks to the pured daemon on :9485. Pre-download the daemon during Docker build and start it in the entrypoint before any purevpn-cli invocations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -213,6 +213,16 @@ auto_mode() {
|
||||
# ════════════════════════════════════════════════════════════════════════════════
|
||||
whitelist_eth0
|
||||
|
||||
# ── Start pured daemon ────────────────────────────────────────────────────────
|
||||
log "Starting pured daemon …"
|
||||
NODE_ENV=production /opt/purevpn-cli/pured-linux-x64 --start &
|
||||
# Wait until daemon is listening on :9485 (up to 15s)
|
||||
for i in $(seq 1 15); do
|
||||
nc -z 127.0.0.1 9485 2>/dev/null && { log "pured listening on :9485"; break; }
|
||||
sleep 1
|
||||
done
|
||||
nc -z 127.0.0.1 9485 2>/dev/null || log "WARNING: pured not listening after 15s — continuing anyway"
|
||||
|
||||
if [[ "$MANUAL_CONNECT" == "true" ]]; then
|
||||
manual_mode
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user