jamesmcm / vopono

Run applications through VPN tunnels with temporary network namespaces
GNU General Public License v3.0
816 stars 45 forks source link

ProtonVPN OpenVPN sync failed to parse auth cookie #224

Open Joromonni opened 1 year ago

Joromonni commented 1 year ago

Hi, this is -probably- user error but I can't figure out what I'm doing wrong in the process.

I am on Manjaro version 6.1.31-2 and using Firefox 114.0.1

  1. I run vopono sync
  2. I pick ProtonVPN -> Plus -> Standard > udp
  3. I go to https://account.protonvpn.com/dashboard like it suggests
  4. and then go to the */api/vpn/v2/users
  5. I check the network tab in the inspector and find the AUTH-* cookie.
  6. I've tried both copying the value (alphanumeric string) AND the name field (AUTH-*)
  7. I get "Error: Failed to parse auth cookie" on both of them of them.

I have OpenVPN installed, I've used it before to connect to ProtonVPN with the OpenVPN / IKEv2 credentials.

jamesmcm commented 1 year ago

Try to copy it from the headers of the request - i.e. find the actual request in the network inspector, and then copy the relevant part from the headers directly.

I'll try to get an example later.

jamesmcm commented 1 year ago

I just tried it with ProtonVPN Free tier and it worked fine:

Note we need the AUTH-... cookie from the request headers, here's an example where I got it from the request to settings from the inspector in Firefox:

2023-06-13-232327_1098x711_scrot

And entering it in vopono:

2023-06-13-232517_3695x277_scrot

I recommend first pasting it into a text editor to make sure you don't have any extra newlines, etc. when copying it.

AndyHoang commented 1 year ago

just want to add in, pasting a value like this AUTH-something:"theother" wont work

this will work AUTH-something=theother

jamesmcm commented 10 months ago

Note the specific AUTH-xxx=yyy cookie you need to copy is the one where xxx there matches the x-pm-uid header.

I've tried to make it a bit clearer in the User Guide - https://github.com/jamesmcm/vopono/blob/master/USERGUIDE.md#openvpn-sync-and-authentication

protonvpn_header

FWIW you can also use the Wireguard configs as custom providers e.g.:

$ vopono -v exec --custom ./hostname-RO-9.conf --protocol wireguard --provider custom --protonvpn-port-forwarding firefox