Open eknowlton opened 5 years ago
I also receive "Error" while trying to use protovpn-cli --ip
.
Please, provide logs with sudo PROTONVPN_CLI_LOG=true pvpn -f
.
$ sudo protonvpn-cli --status
[OpenVPN Status]: Not Running
[ProtonVPN Status]: Not Running
[Internet Status]: Offline
$ sudo PROTONVPN_CLI_LOG=true pvpn -f
[!] Error: There is an internet connection issue.
$ ping google.com
PING google.com (74.125.21.138) 56(84) bytes of data.
64 bytes from yv-in-f138.1e100.net (74.125.21.138): icmp_seq=1 ttl=41 time=19.9 ms
64 bytes from yv-in-f138.1e100.net (74.125.21.138): icmp_seq=2 ttl=41 time=23.1 ms
64 bytes from yv-in-f138.1e100.net (74.125.21.138): icmp_seq=3 ttl=41 time=19.4 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 5ms
rtt min/avg/max/mdev = 19.365/20.764/23.054/1.640 ms
Can you ping api.protonmail.ch? If not, don't you have a firewall somewhere on your connection that would be the cause?
I can ping api.protonmail.ch
. There is no firewall.
Ok, so what about
wget --header 'x-pm-appversion: Other' --header 'x-pm-apiversion: 3' --header 'Accept: application/vnd.protonmail.v1+json' -o /dev/null --timeout 6 --tries 1 -O - 'https://api.protonmail.ch/vpn/location'
I feel like I tried this before and received a different error, but now I get {"Code":1000,"IP":"#.#.#.#","Lat": ##,"Long":##,"Country":"US","ISP":"Spectrum"}
Have you put the "#" for your IP, or is it the real output?
The IP and Long/Lat were correct, I just replaced them. Sorry about that.
Ok, and pvpn -ip
does not work at that time?
Yup, it returns my ip.
Ok, so sudo pvpn --status
should also work. Can you verify?
Ya, here you go...
$ sudo pvpn --status
[OpenVPN Status]: Not Running
[ProtonVPN Status]: Not Running
[Internet Status]: Offline
The "Offline" Internet status is weird, because it is only based upon pvpn --ip
. What about sudo pvpn -ip
? Do you obtain the same output with or without sudo
?
I think your on to something. When I run pvpn -ip
I get my IP as expected. When I run sudo pvpn --ip
I receive Error.
Although I can run sudo wget --header 'x-pm-appversion: Other' --header 'x-pm-apiversion: 3' --header 'Accept: application/vnd.protonmail.v1+json' -o /dev/null --timeout 6 --tries 1 -O - 'https://api.protonmail.ch/vpn/location'
and get the expected response.
Ok, so perhaps that the problem comes from the call of python in the code. What about sudo wget --header 'x-pm-appversion: Other' --header 'x-pm-apiversion: 3' --header 'Accept: application/vnd.protonmail.v1+json' -o /dev/null --timeout 6 --tries 1 -O - 'https://api.protonmail.ch/vpn/location' | sudo python -c 'import json; _ = open("/dev/stdin", "r").read(); print(json.loads(_)["IP"])'
?
It apparently has something to do with the way I have python installed. I use asdf
and have it installed that way, and it hasn't resulted in any problems...
When I run sudo python ...
, I receive No such plugin: python
Just to be sure, if you replace sudo python
by python
in the previous code, it gives you your IP, right?
Yes, it sure does.
Seems like you could get away without that, eh?
Perhaps that @mazen160 should have a look at this, but he hasn't been there for a while now. I'm sorry, but I don't know how to solve your problem at that step. Perhaps someone else, @xilopaint ?
Either way I appreciate you working with me to get this working. Seems there could be a way couple ways to address this, but for now I'll just connect via openvpn
for now.
Thanks again!
@eknowlton are you still interested in this issue?
@eknowlton,
The script use wget
binary without the --no-check-certificate
option.
You can use force this option on your system :
echo "check_certificate = off" >> ~/.wgetrc
It seems that the problem has to do with the script using sudo
to call python. Not to do with wget
.
https://github.com/ProtonVPN/protonvpn-cli/issues/179#issuecomment-478388750
It would seem to me that this command doesn't need and it would pose a security risk to do so anyways.
It does, yes.
On Fri, May 24, 2019, 3:22 PM Arthur Pinheiro notifications@github.com wrote:
It seems that the problem has to do with the script using sudo to call python. Not to do with wget.
So does the CLI work properly if you suppress sudo?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ProtonVPN/protonvpn-cli/issues/179?email_source=notifications&email_token=AAEFAF7L5RS4T2VBX5O4VODPXA55TA5CNFSM4G7CKBCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWGLPZQ#issuecomment-495761382, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEFAF2CIIVYGOCSBL4WV2TPXA55TANCNFSM4G7CKBCA .
It's very cool that you provide a CLI tool for users to connect to ProtoVPN. I'm excited to be able to use it.
Although, I can't seem to get it to work.
I've installed using the documentation, and I initiated a configuration file with
protonvpn-cli --init
, but every time I try to use it, in this exampleprotovpn-cli -m
, I seem to get a problem such as follows.I'm on running
5.0.0-arch1-1-ARCH
. Any ideas on how to diagnose this?