Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

"There is a internet connection issue" #179

Open
eknowlton opened this issue Mar 17, 2019 · 28 comments
Open

"There is a internet connection issue" #179

eknowlton opened this issue Mar 17, 2019 · 28 comments

Comments

@eknowlton
Copy link

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 example protovpn-cli -m, I seem to get a problem such as follows.

2019-03-17-150417_952x368_scrot

I'm on running 5.0.0-arch1-1-ARCH. Any ideas on how to diagnose this?

@eknowlton
Copy link
Author

I also receive "Error" while trying to use protovpn-cli --ip.

@xilopaint
Copy link
Contributor

Please, provide logs with sudo PROTONVPN_CLI_LOG=true pvpn -f.

@eknowlton
Copy link
Author

$ 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

@Tamaranch
Copy link
Contributor

Can you ping api.protonmail.ch? If not, don't you have a firewall somewhere on your connection that would be the cause?

@eknowlton
Copy link
Author

I can ping api.protonmail.ch. There is no firewall.

2019-03-31-165120_1046x311_scrot

@Tamaranch
Copy link
Contributor

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'

@eknowlton
Copy link
Author

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"}

@Tamaranch
Copy link
Contributor

Have you put the "#" for your IP, or is it the real output?

@eknowlton
Copy link
Author

eknowlton commented Mar 31, 2019

The IP and Long/Lat were correct, I just replaced them. Sorry about that.

@Tamaranch
Copy link
Contributor

Ok, and pvpn -ip does not work at that time?

@eknowlton
Copy link
Author

Yup, it returns my ip.

@Tamaranch
Copy link
Contributor

Tamaranch commented Mar 31, 2019

Ok, so sudo pvpn --status should also work. Can you verify?

@eknowlton
Copy link
Author

Ya, here you go...

$ sudo pvpn --status
[OpenVPN Status]: Not Running
[ProtonVPN Status]: Not Running
[Internet Status]: Offline

@Tamaranch
Copy link
Contributor

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?

@eknowlton
Copy link
Author

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.

@eknowlton
Copy link
Author

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.

@Tamaranch
Copy link
Contributor

Tamaranch commented Mar 31, 2019

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"])'?

@eknowlton
Copy link
Author

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

@Tamaranch
Copy link
Contributor

Just to be sure, if you replace sudo python by python in the previous code, it gives you your IP, right?

@eknowlton
Copy link
Author

Yes, it sure does.

@eknowlton
Copy link
Author

Seems like you could get away without that, eh?

@Tamaranch
Copy link
Contributor

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 ?

@eknowlton
Copy link
Author

eknowlton commented Mar 31, 2019

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!

@xilopaint
Copy link
Contributor

xilopaint commented May 10, 2019

@eknowlton are you still interested in this issue?

@goffinet
Copy link

@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

@eknowlton
Copy link
Author

It seems that the problem has to do with the script using sudo to call python. Not to do with wget.

#179 (comment)

@eknowlton
Copy link
Author

It would seem to me that this command doesn't need and it would pose a security risk to do so anyways.

@eknowlton
Copy link
Author

eknowlton commented May 24, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants