WordQuery icon indicating copy to clipboard operation
WordQuery copied to clipboard

网站无法连接?

Open bgwwg opened this issue 8 years ago • 5 comments

在 Mac 上试图用 urllib2 连接 vocabulary.com,程序报错: IOError: [Errno socket error] [Errno 1] _ssl.c:507: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

连接地址为 https://www.vocabulary.com/lists/vocabgrabber/grab.json

bgwwg avatar Jun 28 '17 14:06 bgwwg

@bgwwg 你用的vocabulary插件?我很早就删了啊。这个插件有问题,访问ssl报错。

finalion avatar Jun 28 '17 21:06 finalion

This issue is caused by urllib2 in python2 which uses SSLv3 by default, some servers are configured as rejecting old SSL protocol for security propose, same issue occurs on collins dictionary with AwesomeTTS. I tried to use MITM on collins dictionary, the middle server uses TLSv1.2 to connect the web site, and accepts SSLv3 connections from anki, everything works fine.

GarrisonBaird avatar Jun 29 '17 19:06 GarrisonBaird

@GarrisonBaird 是的。但对普通用户来说,配置这个又太复杂了,如果您有兴趣的话,看能不能做个插件。

finalion avatar Jul 01 '17 19:07 finalion

I don't think a simple plugin can do the trick, and we should report it to upsteam, if necessary. Only Python 2.7.9 or later supports TLSv1.1/v1.2, see https://stackoverflow.com/a/29155638

GarrisonBaird avatar Jul 04 '17 02:07 GarrisonBaird

I digged a little bit more In debian, getting anki from apt, will use system-wild python(2.7.9) and openssl(1.0.1), and I can specify urllib2 to make request with TLSv1.2 with no error in Anki buil-in debug console I think the best way to get to it, is reporting to Anki, asking them to upgrade built-in python (I tried to replace built-in python in Mac and Windows versions but it's a hell !!!)

GarrisonBaird avatar Aug 06 '17 16:08 GarrisonBaird