krey / protonvpn-docker

Setup for running protonvpn inside a docker container
15 stars 7 forks source link

service exit and cannot curl #1

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi,

Hope you are all well !

I have 2 errors when running your repo.

The first one is that the connection time out for some reason.

docker-compose run --service-ports protonvpn
Connecting to US-FREE#2 via UDP...
Connection timed out after 45 Seconds

The second error, while it is still up, when I curl an address, I get the following error:

curl -x socks5h://localhost:1080 https://www.google.com
curl: (7) Unable to receive initial SOCKS5 response.

How to sort it ?

Thanks in advance for any insights or inputs on these two problems.

Cheers, X

krey commented 4 years ago

What's your ~/.pvpn-cli/pvpn-cli.log?

ghost commented 4 years ago

Here is the log

2020-04-22 13:49:43,054 — protonvpn-cli — DEBUG — cli:84 — ###########################
2020-04-22 13:49:43,056 — protonvpn-cli — DEBUG — cli:85 — ### NEW PROCESS STARTED ###
2020-04-22 13:49:43,056 — protonvpn-cli — DEBUG — cli:86 — ###########################
2020-04-22 13:49:43,056 — protonvpn-cli — DEBUG — cli:87 — ['/usr/sbin/protonvpn', 'connect', '--cc', 'US']
2020-04-22 13:49:43,056 — protonvpn-cli — DEBUG — cli:88 — USER: root
2020-04-22 13:49:43,056 — protonvpn-cli — DEBUG — cli:89 — CONFIG_DIR: /root/.pvpn-cli
2020-04-22 13:49:43,073 — protonvpn-cli — DEBUG — cli:92 — Arguments
{'--cc': 'US', '--fastest': False, '--help': False, '--p2p': False, '--random': False, '--sc': False, '--tor': False, '--version': False, '-p': None, '<servername>': 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}
2020-04-22 13:49:43,090 — protonvpn-cli — DEBUG — check_init:467 — Initialized Profile not found
2020-04-22 13:50:49,723 — protonvpn-cli — DEBUG — cli:84 — ###########################
2020-04-22 13:50:49,723 — protonvpn-cli — DEBUG — cli:85 — ### NEW PROCESS STARTED ###
2020-04-22 13:50:49,723 — protonvpn-cli — DEBUG — cli:86 — ###########################
2020-04-22 13:50:49,723 — protonvpn-cli — DEBUG — cli:87 — ['/usr/sbin/protonvpn', 'connect', '--cc', 'US']
2020-04-22 13:50:49,723 — protonvpn-cli — DEBUG — cli:88 — USER: root
2020-04-22 13:50:49,723 — protonvpn-cli — DEBUG — cli:89 — CONFIG_DIR: /root/.pvpn-cli
2020-04-22 13:50:49,729 — protonvpn-cli — DEBUG — cli:92 — Arguments
{'--cc': 'US', '--fastest': False, '--help': False, '--p2p': False, '--random': False, '--sc': False, '--tor': False, '--version': False, '-p': None, '<servername>': 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}
2020-04-22 13:50:49,745 — protonvpn-cli — DEBUG — check_init:457 — Config USER/split_tunnel not found, default set
2020-04-22 13:50:49,746 — protonvpn-cli — DEBUG — set_config_value:133 — Writing split_tunnel to [USER] in config file
2020-04-22 13:50:49,747 — protonvpn-cli — DEBUG — country_f:170 — Starting fastest country connect
2020-04-22 13:50:49,747 — protonvpn-cli — DEBUG — disconnect:308 — Initiating disconnect
2020-04-22 13:50:49,757 — protonvpn-cli — DEBUG — is_connected:195 — Checking connection Status. OpenVPN processes: 0
2020-04-22 13:50:49,757 — protonvpn-cli — DEBUG — manage_dns:614 — Restoring DNS
2020-04-22 13:50:49,758 — protonvpn-cli — DEBUG — manage_dns:631 — No Backupfile found
2020-04-22 13:50:49,758 — protonvpn-cli — DEBUG — manage_ipv6:690 — Restoring ip6tables
2020-04-22 13:50:49,758 — protonvpn-cli — DEBUG — manage_ipv6:705 — No Backupfile found
2020-04-22 13:50:49,758 — protonvpn-cli — DEBUG — manage_killswitch:780 — Restoring iptables
2020-04-22 13:50:49,758 — protonvpn-cli — DEBUG — manage_killswitch:789 — No Backupfile found
2020-04-22 13:50:49,758 — protonvpn-cli — DEBUG — disconnect:348 — No connection found
2020-04-22 13:50:49,758 — protonvpn-cli — DEBUG — call_api:36 — Initiating API Call: https://api.protonvpn.ch/vpn/logicals
2020-04-22 13:50:50,041 — protonvpn-cli — DEBUG — call_api:65 — Successful json response
2020-04-22 13:50:50,142 — protonvpn-cli — DEBUG — pull_server_data:87 — SERVER_INFO_FILE written
2020-04-22 13:50:50,152 — protonvpn-cli — DEBUG — pull_server_data:94 — last_api_call updated
2020-04-22 13:50:50,154 — protonvpn-cli — DEBUG — get_servers:101 — Reading servers from file
2020-04-22 13:50:50,173 — protonvpn-cli — DEBUG — get_fastest_server:170 — Returning fastest server with pool size 1
2020-04-22 13:50:50,173 — protonvpn-cli — DEBUG — openvpn_connect:443 — Initiating OpenVPN connection
2020-04-22 13:50:50,173 — protonvpn-cli — DEBUG — openvpn_connect:444 — Connecting to US-FREE#1 via UDP
2020-04-22 13:50:50,173 — protonvpn-cli — DEBUG — get_servers:101 — Reading servers from file
2020-04-22 13:50:50,184 — protonvpn-cli — DEBUG — openvpn_connect:461 — IPs: ['108.59.0.37', '108.59.0.38', '108.59.0.39', '192.96.203.69', '192.96.203.70', '207.244.109.179', '207.244.109.180', '209.58.142.154', '209.58.142.155', '209.58.142.157', '209.58.142.158', '209.58.142.159', '209.58.142.161', '209.58.147.210', '209.58.147.238', '209.58.147.239', '209.58.147.241', '209.58.147.242', '209.58.147.244', '209.58.147.245', '108.62.49.129', '217.138.206.83', '217.138.206.84', '217.138.206.85', '217.138.206.86']
2020-04-22 13:50:50,185 — protonvpn-cli — DEBUG — openvpn_connect:462 — connect.ovpn written
2020-04-22 13:50:50,185 — protonvpn-cli — DEBUG — disconnect:308 — Initiating disconnect
2020-04-22 13:50:50,195 — protonvpn-cli — DEBUG — is_connected:195 — Checking connection Status. OpenVPN processes: 0
2020-04-22 13:50:50,196 — protonvpn-cli — DEBUG — manage_dns:614 — Restoring DNS
2020-04-22 13:50:50,196 — protonvpn-cli — DEBUG — manage_dns:631 — No Backupfile found
2020-04-22 13:50:50,196 — protonvpn-cli — DEBUG — manage_ipv6:690 — Restoring ip6tables
2020-04-22 13:50:50,196 — protonvpn-cli — DEBUG — manage_ipv6:705 — No Backupfile found
2020-04-22 13:50:50,196 — protonvpn-cli — DEBUG — manage_killswitch:780 — Restoring iptables
2020-04-22 13:50:50,196 — protonvpn-cli — DEBUG — manage_killswitch:789 — No Backupfile found
2020-04-22 13:50:50,196 — protonvpn-cli — DEBUG — disconnect:348 — No connection found
2020-04-22 13:50:50,197 — protonvpn-cli — DEBUG — get_ip_info:143 — Getting IP Information
2020-04-22 13:50:50,197 — protonvpn-cli — DEBUG — call_api:36 — Initiating API Call: https://api.protonvpn.ch/vpn/location
2020-04-22 13:50:50,357 — protonvpn-cli — DEBUG — call_api:65 — Successful json response
2020-04-22 13:50:50,359 — protonvpn-cli — DEBUG — openvpn_connect:482 — OpenVPN process started
2020-04-22 13:51:35,406 — protonvpn-cli — DEBUG — openvpn_connect:530 — Connection timed out after 45 Seconds
krey commented 4 years ago

Hmm ok how about ~/.pvpn-cli/ovpn.log?

ghost commented 4 years ago
openvpn: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory
krey commented 4 years ago

Thanks, fix coming soon

krey commented 4 years ago

Please pull the latest version and rebuild your docker image

ghost commented 4 years ago

testing now, btw you should put protonmail credentials as environment attributes in the docker-compose ?!

ghost commented 4 years ago

works fine now :-) thanks for your help

krey commented 4 years ago

testing now, btw you should put protonmail credentials as environment attributes in the docker-compose ?!

I'm not sure I want to move the protonvpn init from build to run.

Why would it be better?

ghost commented 4 years ago

I mean hardcoded credentials are not good.

krey commented 4 years ago

I mean hardcoded credentials are not good.

Agreed - take a look at this commit https://github.com/krey/protonvpn-docker/commit/a541ba2b16740bab24849cab6213be69f06e9bba

No more hardcoded values...

krey commented 4 years ago

Closing - feel free to re-open if necessary