网站无法连接?
在 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 你用的vocabulary插件?我很早就删了啊。这个插件有问题,访问ssl报错。
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 是的。但对普通用户来说,配置这个又太复杂了,如果您有兴趣的话,看能不能做个插件。
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
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 !!!)