Kabe0 / deluge-windscribe

To provide an isolated VPN layer with Deluge
22 stars 6 forks source link

Unable to properly connect to Windscribe. #6

Closed xarathos517 closed 4 years ago

xarathos517 commented 4 years ago

My launch script:

docker run -v /c/users/xarat/Documents/deluge-windscribe/config/:/config -v /c/users/xarat/downloads/:/downloads -p 8112:8112 --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun --name deluge-windscribe kabe0/deluge-windscribe

The result:

Traceback (most recent call last):
  File "/usr/bin/init.py", line 43, in <module>
    raise Exception(f"Unable to properly connect to Windscribe. Make sure username/password is correct in the {vpnAuth} file.")
Exception: Unable to properly connect to Windscribe. Make sure username/password is correct in the /config/auth.conf file.

auth.conf is in the specified location and has two lines as instructed with my windscribe OVPN username/password. Not sure what I'm doing wrong.

Kabe0 commented 4 years ago

Windows is probably creating new lines that are bad \n\r while python by default usually only reads \n. One option would be to either save the .conf file in an editor that supports setting line breaks to unix style (\n).

What I would recommend though is setting the environment variables VPN_USERNAME, VPN_PASSWORD, and VPN_LOCATION. They function in the same way, but will let you get around the windows new line issue.

docker run \
-e VPN_USERNAME=name \
-e VPN_PASSWORD=pass \
-e VPN_LOCATION=best \
-v /c/users/xarat/Documents/deluge-windscribe/config/:/config \
-v /c/users/xarat/downloads/:/downloads \
-p 8112:8112 --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun \
--name deluge-windscribe kabe0/deluge-windscribe
xarathos517 commented 4 years ago

Tried that as suggested; no change. It doesn't even stop complaining that I should check the vpnAuth file. Also experimentally resaved with another editor to ensure it was using Unix line endings, but got same error. Wondering if I'm missing a python dependency or something stupid like that. IDK. I'll keep poking.

Kabe0 commented 4 years ago

Ok so let me try this out...

  1. Is this on windows that your running the docker container?
  2. if possible, clear out the lines in your auth.conf and then send it to me so I can take a look to see if there is anything wrong with the file itself. It might be an OS thing.
  3. Can you send me the current command your using to run the docker container (without the username/password being set)
xarathos517 commented 4 years ago

Point by point:

  1. Yes. Docker is running on Windows 10 Pro. Don't believe I changed any settings from defaults.
  2. auth.zip
  3. below, copy/pasted from my last attempt docker run -e VPN_USERNAME= -e VPN_PASSWORD= -e VPN_LOCATION=best -v /c/users/xarat/Documents/deluge-windscribe/config/:/config -v /c/users/xarat/downloads/:/downloads -p 8112:8112 --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun --name deluge-windscribe kabe0/deluge-windscribe
joetheory commented 4 years ago

I'm actually experiencing the same issue while trying to get this running on my Synology NAS. If I use ENVIRONMENT vars I get the following:

Initializing Container Starting windscribe ... OK Traceback (most recent call last): File "/usr/bin/init.py", line 43, in raise Exception(f"Unable to properly connect to Windscribe. Make sure username/password is correct in the {vpnAuth} file.") Exception: Unable to properly connect to Windscribe. Make sure username/password is correct in the /config/auth.conf file.

If I use the auth.conf method I get a whole different set of errors:

Initializing Container Starting windscribe ... OK Traceback (most recent call last): File "/usr/bin/init.py", line 41, in cond = child.expect(['Please login to use Windscribe', 'Service communication error', pexpect.EOF], timeout=50) File "/usr/local/lib/python3.6/dist-packages/pexpect/spawnbase.py", line 344, in expect timeout, searchwindowsize, async_) File "/usr/local/lib/python3.6/dist-packages/pexpect/spawnbase.py", line 372, in expect_list return exp.expect_loop(timeout) File "/usr/local/lib/python3.6/dist-packages/pexpect/expect.py", line 181, in expect_loop return self.timeout(e) File "/usr/local/lib/python3.6/dist-packages/pexpect/expect.py", line 144, in timeout raise exc pexpect.exceptions.TIMEOUT: Timeout exceeded. <pexpect.pty_spawn.spawn object at 0x7f899a9a4b38> command: /usr/bin/windscribe args: ['/usr/bin/windscribe', 'connect', '<location|best>'] buffer (last 100 chars): b'\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\' before (last 100 chars): b'\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\\x08-\x08/\x08|\x08\' after: <class 'pexpect.exceptions.TIMEOUT'> match: None match_index: None exitstatus: None flag_eof: False pid: 71 child_fd: 6 closed: False timeout: 30 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: 0: re.compile(b'Please login to use Windscribe') 1: re.compile(b'Service communication error') 2: EOF

Any help you can offer would be a dream! Thanks.

hacktek commented 4 years ago

Same problem in Ubuntu 18.04.

Traceback (most recent call last): File "/usr/bin/init.py", line 43, in raise Exception(f"Unable to properly connect to Windscribe. Make sure username/password is correct in the {vpnAuth} file.") Exception: Unable to properly connect to Windscribe. Make sure username/password is correct in the /config/auth.conf file.

Command:

docker run -d --cap-add=NET_ADMIN --device=/dev/net/tun --name=windscribe --dns=8.8.8.8 --restart=always -e "VPN_USERNAME=xxxx" -e "VPN_PASSWORD=xxxxx" -v /etc/localtime:/etc/localtime:ro kabe0/deluge-windscribe

Kabe0 commented 4 years ago

I pushed in an update (1.7.0) which will look for new line breaks for linux and windows. Let me know if it's still happening.

solaristrading commented 4 years ago

For what it is worth, I had the same issues when I set it up. The problem was that I was using a username and password from the OpenVPN config generator. You need to enter the username and password that you use to log in to the Windscribe website, as the docker is using the Windscribe client and has nothing to do with OpenVPN. Once I did that everything worked great.

Kabe0 commented 4 years ago