walterl / proton-privoxy

Privoxy over ProtonVPN in Docker
MIT License
112 stars 29 forks source link

Error connecting to any server - Connection failed after 45 Seconds #49

Closed PingoLeon closed 6 months ago

PingoLeon commented 7 months ago

Steps to reproduce : Running Docker under Ubuntu 22.04 LTS using Portainer to setup all -> set ports to 8888:8080 -> set volumes to /etc/localtime:/etc/localtime:ro -> setting PVPN_USERNAME and PVPN_PASSWORD to the correct OpenVPN credentials (found on protonVPN website) -> activating debugging (value set to 1) I left everything left to default to ensure no malfunction

Output of the logs :

2024-03-30 00:34:44,295 — protonvpn-cli — DEBUG — pull_server_data:101 — last_api_call updated 2024-03-30 00:34:44,969 — protonvpn-cli — DEBUG — cli:89 — ########################### 2024-03-30 00:34:44,969 — protonvpn-cli — DEBUG — cli:90 — ### NEW PROCESS STARTED ### 2024-03-30 00:34:44,969 — protonvpn-cli — DEBUG — cli:91 — ########################### 2024-03-30 00:34:44,970 — protonvpn-cli — DEBUG — cli:92 — ['/usr/bin/protonvpn', 'connect', '--fastest'] 2024-03-30 00:34:44,970 — protonvpn-cli — DEBUG — cli:93 — USER: root 2024-03-30 00:34:44,970 — protonvpn-cli — DEBUG — cli:94 — CONFIG_DIR: /root/.pvpn-cli 2024-03-30 00:34:44,980 — protonvpn-cli — DEBUG — cli:97 — Arguments {'--cc': None, '--fastest': True, '--help': False, '--p2p': False, '--random': False, '--sc': False, '--tor': False, '--version': False, '-p': None, '': None, 'c': False, 'configure': False, 'connect': True, 'd': False, 'disconnect': False, 'examples': False, 'init': False, 'r': False, 'reconnect': False, 'refresh': False, 's': False, 'status': False} 2024-03-30 00:34:45,001 — protonvpn-cli — DEBUG — fastest:161 — Starting fastest connect 2024-03-30 00:34:45,013 — protonvpn-cli — DEBUG — disconnect:323 — Initiating disconnect 2024-03-30 00:34:45,019 — protonvpn-cli — DEBUG — is_connected:202 — Checking connection Status. OpenVPN processes: 0 2024-03-30 00:34:45,020 — protonvpn-cli — DEBUG — manage_dns:624 — Restoring DNS 2024-03-30 00:34:45,020 — protonvpn-cli — DEBUG — manage_dns:641 — No Backupfile found 2024-03-30 00:34:45,021 — protonvpn-cli — DEBUG — manage_ipv6:704 — Restoring ip6tables 2024-03-30 00:34:45,021 — protonvpn-cli — DEBUG — manage_ipv6:719 — No Backupfile found 2024-03-30 00:34:45,023 — protonvpn-cli — DEBUG — manage_killswitch:794 — Restoring iptables 2024-03-30 00:34:45,023 — protonvpn-cli — DEBUG — manage_killswitch:803 — No Backupfile found 2024-03-30 00:34:45,023 — protonvpn-cli — DEBUG — disconnect:363 — No connection found 2024-03-30 00:34:45,041 — protonvpn-cli — DEBUG — call_api:38 — Initiating API Call: https://api.protonvpn.ch/vpn/logicals 2024-03-30 00:34:45,972 — protonvpn-cli — DEBUG — call_api:72 — Successful json response 2024-03-30 00:34:46,604 — protonvpn-cli — DEBUG — pull_server_data:94 — SERVER_INFO_FILE written 2024-03-30 00:34:46,616 — protonvpn-cli — DEBUG — pull_server_data:101 — last_api_call updated 2024-03-30 00:34:46,630 — protonvpn-cli — DEBUG — get_servers:108 — Reading servers from file 2024-03-30 00:34:46,728 — protonvpn-cli — DEBUG — get_fastest_server:177 — Returning fastest server with pool size 4 2024-03-30 00:34:46,731 — protonvpn-cli — DEBUG — openvpn_connect:458 — Initiating OpenVPN connection 2024-03-30 00:34:46,731 — protonvpn-cli — DEBUG — openvpn_connect:459 — Connecting to CH#108 via UDP 2024-03-30 00:34:46,731 — protonvpn-cli — DEBUG — get_servers:108 — Reading servers from file 2024-03-30 00:34:46,877 — protonvpn-cli — DEBUG — render_j2_template:262 — Rendered /root/.pvpn-cli/connect.ovpn from openvpn_template.j2 2024-03-30 00:34:46,888 — protonvpn-cli — DEBUG — disconnect:323 — Initiating disconnect 2024-03-30 00:34:46,892 — protonvpn-cli — DEBUG — is_connected:202 — Checking connection Status. OpenVPN processes: 0 2024-03-30 00:34:46,893 — protonvpn-cli — DEBUG — manage_dns:624 — Restoring DNS 2024-03-30 00:34:46,893 — protonvpn-cli — DEBUG — manage_dns:641 — No Backupfile found 2024-03-30 00:34:46,894 — protonvpn-cli — DEBUG — manage_ipv6:704 — Restoring ip6tables 2024-03-30 00:34:46,894 — protonvpn-cli — DEBUG — manage_ipv6:719 — No Backupfile found 2024-03-30 00:34:46,894 — protonvpn-cli — DEBUG — manage_killswitch:794 — Restoring iptables 2024-03-30 00:34:46,895 — protonvpn-cli — DEBUG — manage_killswitch:803 — No Backupfile found 2024-03-30 00:34:46,895 — protonvpn-cli — DEBUG — disconnect:363 — No connection found 2024-03-30 00:34:46,896 — protonvpn-cli — DEBUG — get_ip_info:150 — Getting IP Information 2024-03-30 00:34:46,897 — protonvpn-cli — DEBUG — call_api:38 — Initiating API Call: https://api.protonvpn.ch/vpn/location 2024-03-30 00:34:47,143 — protonvpn-cli — DEBUG — call_api:72 — Successful json response 2024-03-30 00:34:47,169 — protonvpn-cli — DEBUG — openvpn_connect:492 — OpenVPN process started 2024-03-30 00:35:32,214 — protonvpn-cli — DEBUG — openvpn_connect:540 — Connection failed after 45 Seconds Connecting to CH#108 via UDP... Connection failed. Device "proton0" does not exist. Failed to bring up VPN :(

**Many problems before this come up, like using protonvpn regular credentials instead of OpenVPN ones, not the good tier setup. Do I need to include configuration files from the https://account.protonvpn.com/downloads website ? Here the account used is a ProtonVPN Plus user, so PVPN_TIER 2 default should be fine.

Any idea on how to fix this ?

What has been tried : changing 8888:8080 to TCP to try out -no effect adding "+pmp" to the PVPN_USERNAME, same result. reversing the credentials (maybe swapped out the 2) - "Please check your Username Or Password" composing the container via the docker-compose.yml example provided in README - error in Python on the ip6tables tried different other tiers - no results, server not found, etc...**

sudo ip6tables-save :

Generated by ip6tables-save v1.8.7 on Sat Mar 30 00:27:38 2024 filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :ts-forward - [0:0] :ts-input - [0:0] -A INPUT -j ts-input -A FORWARD -j ts-forward -A ts-forward -i tailscale0 -j MARK --set-xmark 0x40000/0xff0000 -A ts-forward -m mark --mark 0x40000/0xff0000 -j ACCEPT -A ts-forward -o tailscale0 -j ACCEPT -A ts-input -s fd7a:115c:a1e0::49b3:1878/128 -i lo -j ACCEPT -A ts-input -i tailscale0 -j ACCEPT -A ts-input -p udp -m udp --dport 41641 -j ACCEPT COMMIT Completed on Sat Mar 30 00:27:38 2024 Generated by ip6tables-save v1.8.7 on Sat Mar 30 00:27:38 2024 nat :PREROUTING ACCEPT [0:0] :INPUT ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] :ts-postrouting - [0:0] -A POSTROUTING -j ts-postrouting -A ts-postrouting -m mark --mark 0x40000/0xff0000 -j MASQUERADE COMMIT Completed on Sat Mar 30 00:27:38 2024

Thanks for your help

PingoLeon commented 7 months ago

I also noted that you don't need the quotes in PVPN_CMD_ARGS like "connect --cc CH" which is mentioned in the README.md .

By default, no quotes will be placed in the value of the env, and putting the args in quotes will end up breaking the protonvpn commands.

jaimeet commented 7 months ago

Same issue is arising with my container also. I think ther might be issue with with proton api. Iam having same output _proton-privoxy_logs.txt

PingoLeon commented 7 months ago

Same issue is arising with my container also. I think ther might be issue with with proton api. Iam having same output _proton-privoxy_logs.txt

At least your logs clearly share there could be an error through the API, but I can't figure out for me if it's the configuration of my own network or an API related problem

Solution I could find to bypass this is to use OpenVPN config file from proton website, and setup a container acting as an OpenVPN proxy, I will try this out while the problem remains unsolved for this privoxy container

ProgramComputer commented 6 months ago

Same issue is arising with my container also. I think ther might be issue with with proton api. Iam having same output _proton-privoxy_logs.txt

At least your logs clearly share there could be an error through the API, but I can't figure out for me if it's the configuration of my own network or an API related problem

Solution I could find to bypass this is to use OpenVPN config file from proton website, and setup a container acting as an OpenVPN proxy, I will try this out while the problem remains unsolved for this privoxy container

Assuming your setup is correct, try building the container then restart it. Look at https://github.com/walterl/proton-privoxy/issues/2. 'proton0' interface is not up.

PingoLeon commented 6 months ago

Ended up using GlueTUN's container, because I saw a lot of answers and troubleshoot guides using this, it now works flawlessly. Might give another chance to privoxy in the future, but not sure.