Deluge add torrent through URL fails with HTTPS

General support for problems installing or using Deluge
Post Reply
luker
New User
New User
Posts: 7
Joined: Wed Apr 01, 2015 6:29 pm

Deluge add torrent through URL fails with HTTPS

Post by luker »

I am trying to add a torrent by URL which happens to be an https link and the site uses cloudflare (I've heard that their certificate is the problem/openssl and python). I get the following error:

Code: Select all

[('SSL routines', 'SSL23_GET_SERVER_HELLO', 'tlsv1 alert internal error')]
I get this through both the console and the webui

I have version 1.3.12 of deluge, and I have tried it on the Windows version (Windows 2012 R2) and on Ubuntu 15.10 with Python 2.7.9 / pyOpenSSL 0.15.1 with the same result. I have seen some posts about this issue but they are saying that it is resolved with using Python 2.7.9 but I still cannot get it to work.

Anyone had any luck?
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge add torrent through URL fails with HTTPS

Post by Cas »

Are you using the python 2.7 Windows version?

From my brief understanding it is fixed in Python 2.7.10 although because it is a combination of SSL packages it's not specifically a Python version issue.
luker
New User
New User
Posts: 7
Joined: Wed Apr 01, 2015 6:29 pm

Re: Deluge add torrent through URL fails with HTTPS

Post by luker »

I was using the 2.7 windows version yes.

And actually I just built out a Fedora 22 server that is using Python 2.7.10 and installed Deluge 1.3.11 (that's what's in their repository still) and still get the same behavior.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge add torrent through URL fails with HTTPS

Post by Cas »

I am surprised that the Windows version did not work.

Can you provide the full traceback and the url?
luker
New User
New User
Posts: 7
Joined: Wed Apr 01, 2015 6:29 pm

Re: Deluge add torrent through URL fails with HTTPS

Post by luker »

Here's the traceback running from the windows 1.3.12 version (python 2.7):

Code: Select all

[DEBUG   ] 11:54:50 addtorrentdialog:665 url: ********
[DEBUG   ] 11:54:50 addtorrentdialog:715 Download failed: [Failure instance: Traceback: <class 'OpenSSL.SSL.Error'>: [('SSL routines', 'SSL23_GET_SERVER_HELLO', 'tlsv1 alert internal error')]
twisted/internet/selectreactor.py:149:_doReadOrWrite
twisted/internet/tcp.py:209:doRead
twisted/internet/tcp.py:215:_dataReceived
twisted/protocols/tls.py:415:dataReceived
--- <exception caught here> ---
twisted/protocols/tls.py:554:_write
OpenSSL/SSL.py:1271:send
OpenSSL/SSL.py:1187:_raise_ssl_error
OpenSSL/_util.py:48:exception_from_error_queue
]
I'll send you the URL
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge add torrent through URL fails with HTTPS

Post by Cas »

Thanks, this might be Twisted not supporting TLSv1.2 SNI but none of the proposed fixes work...
luker
New User
New User
Posts: 7
Joined: Wed Apr 01, 2015 6:29 pm

Re: Deluge add torrent through URL fails with HTTPS

Post by luker »

Bummer, any way that we can have deluge force a different connection type?
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge add torrent through URL fails with HTTPS

Post by Cas »

I have a working fix but only if using Twisted >= 14. There is no other solution except to not use https cloudfare urls because their certs require TLSv1.2 and SNI.

I have opened a ticket to track this issue: http://dev.deluge-torrent.org/ticket/2765
Post Reply