guillaumedsde / alpine-qbittorrent-openvpn

qBittorrent docker container with OpenVPN client running as unprivileged user on alpine linux
https://guillaumedsde.gitlab.io/alpine-qbittorrent-openvpn/
GNU General Public License v3.0
216 stars 40 forks source link

expressvpn issue? #8

Closed malventano closed 4 years ago

malventano commented 4 years ago

Attempting to use with expressvpn. container fails to start. it appears to be pulling the relevant .ovpn but looks to be missing some variables from somewhere? log:

Trying to use OpenVPN provider: EXPRESSVPN
Connecting to raw.githubusercontent.com (151.101.0.133:443)
saving to '/config/openvpn/config.ovpn'
config.ovpn          100% |********************************|  6131  0:00:00 ETA
'/config/openvpn/config.ovpn' saved
Found OpenVPN configuration: /config/openvpn/config.ovpn for provider EXPRESSVPN at https://raw.githubusercontent.com/haugene/docker-transmission-openvpn/master/openvpn/expressvpn/my_expressvpn_usa_-_san_francisco_udp.ovpn using it
[cont-init.d] 02-setup-openvpn: exited 0.
[cont-init.d] 03-setup-iptables: executing... 
One of the following variables could not be detected in the VPN configuration:
    VPN_PROTO:  
    VPN_HOST:   usa-sanfrancisco-ca-version-2.expressnetw.com
    VPN_PORT:   1195

[cont-init.d] 03-setup-iptables: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Using similar settings with haugene/docker-transmission-openvpn appears to function properly.

guillaumedsde commented 4 years ago

Yep, I've included a fallback default value in case the config does not have a protocol (fallback to udp) or is missing a port (fallback to 1194), these changes are in ac5d7d0 once the pipeline is finished could you pull the new image and let me know if everything works?

malventano commented 4 years ago

Looks like the pipeline job failed...?

guillaumedsde commented 4 years ago

whoops, this should be fixed after this pipeline hehe https://gitlab.com/guillaumedsde/alpine-qbittorrent-openvpn/-/pipelines/157797418

malventano commented 4 years ago

Looks like it started up ok. Will do some more testing. The only thing that looked odd in the log this time was:

[cont-init.d] 02-setup-openvpn: exited 0.
[cont-init.d] 03-setup-iptables: executing... 
sh: missing ]
/var/run/s6/etc/cont-init.d/03-setup-iptables: line 27: -z: not found
[cont-init.d] 03-setup-iptables: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
malventano commented 4 years ago

Hmm, maybe it's not actually working. I was getting odd segfaults from qbittorrent-nox when porting over an existing config from markusmcnugen/qbittorrentvpn:latest (seemed to happen when the client tried to check fast-resume data), so I tried starting with a clean config, I checked logs, looked like the VPN was up, etc. Opened the webui and went to search - search plugins - check for updates, and the log started throwing a bunch of these:

QIODevice::read (QProcess): device not open
Could not parse Nova search engine capabilities, msg:  
QIODevice::read (QProcess): device not open

(qBittorrent was unable to pull the plugin list and just stalls when trying)

guillaumedsde commented 4 years ago

Looks like it started up ok. Will do some more testing. The only thing that looked odd in the log this time was:

[cont-init.d] 02-setup-openvpn: exited 0.
[cont-init.d] 03-setup-iptables: executing... 
sh: missing ]
/var/run/s6/etc/cont-init.d/03-setup-iptables: line 27: -z: not found
[cont-init.d] 03-setup-iptables: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

weird my container didn't have this issue. In any case I know where this is from, the latest commit fixes these issues along with making shell script variable expansion more reliable.

guillaumedsde commented 4 years ago

Hmm, maybe it's not actually working. I was getting odd segfaults from qbittorrent-nox when porting over an existing config from markusmcnugen/qbittorrentvpn:latest (seemed to happen when the client tried to check fast-resume data), so I tried starting with a clean config, I checked logs, looked like the VPN was up, etc. Opened the webui and went to search - search plugins - check for updates, and the log started throwing a bunch of these:

QIODevice::read (QProcess): device not open
Could not parse Nova search engine capabilities, msg:  
QIODevice::read (QProcess): device not open

(qBittorrent was unable to pull the plugin list and just stalls when trying)

yeah from memory, the search engine requires python which isnt installed here , I'm looking into this

guillaumedsde commented 4 years ago

Yeah that's the issue, python isn't installed, I've set the CI to build an image tagged python (automatic builds are enabled for this tag).

Once this CI pipeline is done (and if it is sucessful ;) ) you can pull guillaumedsde/alpine-qbittorrent-openvpn:python and you should be able to add search engines, let me know how that goes

malventano commented 4 years ago

Failed again :P (the pipeline, that is)

guillaumedsde commented 4 years ago

damn hehe those multi architecture builds are not meant for gitlab CI.... (computationally expensive).

I've fixed it (again) the image is built at: guillaumedsde/alpine-qbittorrent-openvpn:python

malventano commented 4 years ago

Ok, switched to new image and cleared all settings. Search can pull down plugins now, but with that working, I think we're back to exposing some oddities that I was originally seeing:

...so I can't put my finger on it, but something is getting in the way of the traffic somehow.

guillaumedsde commented 4 years ago

hum...

guillaumedsde commented 4 years ago

Yeah that's the issue, python isn't installed, I've set the CI to build an image tagged python (automatic builds are enabled for this tag).

Once this CI pipeline is done (and if it is sucessful ;) ) you can pull guillaumedsde/alpine-qbittorrent-openvpn:python and you should be able to add search engines, let me know how that goes

I've documented the python variant of the image in the README in commit f828216b5a181654fd6fc4ab91575fee5957b266

guillaumedsde commented 4 years ago

Seems like the issue is resolved? feel free to reopen if that's not the case :)