feat: manual connect mode + env -i sudo wrapper to fix pkg bootstrap crash

- MANUAL_CONNECT=true: container waits for tun0, user connects via docker exec
- MANUAL_CONNECT=false: auto mode (current), now with env -i in sudo wrapper
- sudo wrapper logs inherited env key names so we can see what parent injects
- monitor_loop extracted as shared function used by both modes
- auto mode connect logic cleaned up into a single while-true rotation loop
This commit is contained in:
2026-03-12 07:23:19 +01:00
parent c68f3325bb
commit 173bd87437
3 changed files with 169 additions and 193 deletions

View File

@@ -36,6 +36,9 @@ services:
# Example: "United States,United Kingdom,Germany,Netherlands,France"
- PUREVPN_LOCATIONS=${PUREVPN_LOCATIONS:-}
- SOCKS5_INNER_PORT=1080
# MANUAL_CONNECT=true → container waits; you run purevpn-cli manually via docker exec
# MANUAL_CONNECT=false → auto login + connect (default)
- MANUAL_CONNECT=${MANUAL_CONNECT:-false}
env_file:
- .env
networks: