XX-net / XX-Net

A proxy tool to bypass GFW.
32.88k stars 7.71k forks source link

openssl import 错误 from cryptography.hazmat.bindings._openssl import ffi, lib #5609

Open lhfly5201314 opened 7 years ago

lhfly5201314 commented 7 years ago

大家好!求助大家一个issue!之前我一直用的是老版的XX-Net 2.4.0的,配合chrome,用起来速度非常快,所以就没想着更新。没想到昨天晚上更新chrome之后,今天早上再开机,就出现了 “您的连接不是私密连接"这个问题,安装大家提供的各种解决这个问题的方法都是试过了,删除证书,重新导入,还有卸载重新安装chrome,都是不行。这个证书就是没有更新。没办法,我就想试试新版的3.3.1,下载下来启动,居然报了下面的错,说是bingding._openssl出错了,用了3.3.2也是这个报错,说是import出问题了。但是我在python2的交互界面,导入错误日志的最后一行是没有问题的啊,正常import啊,有没有哪位朋友也碰见过这个问题啊,不吝赐教,谢谢大家,祝大家节日快乐!

May 28 13:05:53.919 - [INFO] import build-in openssl fail:ImportError('DLL load failed: %1 \xb2\xbb\xca\xc7\xd3\xd0\xd0\xa7\xb5\xc4 Win32 \xd3\xa6\xd3\xc3\xb3\xcc\xd0\xf2\xa1\xa3',) May 28 13:05:53.933 - [ERROR] import system python-OpenSSL fail:ImportError('DLL load failed: %1 \xb2\xbb\xca\xc7\xd3\xd0\xd0\xa7\xb5\xc4 Win32 \xd3\xa6\xd3\xc3\xb3\xcc\xd0\xf2\xa1\xa3',) May 28 13:05:53.936 - [ERROR] Except stack:Traceback (most recent call last): File "C:\Users\Administrator\Desktop\XX-Net-3.3.1\XX-Net-3.3.1\code\default\launcher\start.py", line 112, in import OpenSSL File "C:\Users\Administrator\Desktop\XX-Net-3.3.1\XX-Net-3.3.1\code\default\python27\1.0\lib\noarch\OpenSSL__init__.py", line 8, in from OpenSSL import rand, crypto, SSL File "C:\Users\Administrator\Desktop\XX-Net-3.3.1\XX-Net-3.3.1\code\default\python27\1.0\lib\noarch\OpenSSL\rand.py", line 12, in from OpenSSL._util import ( File "C:\Users\Administrator\Desktop\XX-Net-3.3.1\XX-Net-3.3.1\code\default\python27\1.0\lib\noarch\OpenSSL_util.py", line 6, in from cryptography.hazmat.bindings.openssl.binding import Binding File "C:\Users\Administrator\Desktop\XX-Net-3.3.1\XX-Net-3.3.1\code\default\python27\1.0\lib\win32\cryptography\hazmat\bindings\openssl\binding.py", line 15, in from cryptography.hazmat.bindings._openssl import ffi, lib ImportError: DLL load failed: %1 不是有效的 Win32 应用程序。

SeaHOH commented 7 years ago

你是从那个文件启动的?

lhfly5201314 commented 7 years ago

是从,解压后的文件里面的start.bat启动的呀

lhfly5201314 commented 7 years ago

我又试了几次,看了下日志,定位了它报错的那个文件,就是在C:\Users\Administrator\Desktop\XX-Net-3.3.1\XX-Net-3.3.1\code\default\python27\1.0\lib\win32\cryptography\hazmat\bindings这个目录下的_openssl.pyd这个文件里面导入ffl,lib的时候回报,报错是说build-in openssl fail,内建openssl错误,难道是我系统出啥问题了,在我笔记本上用3.3.1是ok的啊

lhfly5201314 commented 7 years ago

最下面的提示是:ImportError :DLL load failedd:%1 不是有效的win32应用程序

Try install python-openssl 难道我还真需要再重新安装python-openssl,这应该不挨着啊,是内建的函数的问题吧。??

SeaHOH commented 7 years ago

会不会解压错误?尝试重新下载解压。暂时想到这个~

lhfly5201314 commented 7 years ago

诶,不行啊。重新下载解压了n次了,直接从github上clone下来的也是报这个错,见鬼了!

jzp820927 commented 7 years ago

是什么系统啊?安装有独立的 python 吗?

SeaHOH commented 7 years ago

@jzp820927 应该不影响,他是从 start.bat 启动的。

jzp820927 commented 7 years ago

额,我只是随口问问,其实我也不知道是什么原因

SeaHOH commented 7 years ago

我也是想不通,都是 32 bit 的,应该能运行啊,也没见别人报这个 issuse。

jzp820927 commented 7 years ago

说不定是他系统有问题呢

haohetao commented 7 years ago

windows 10 64bit 完全一样的问题

jzp820927 commented 7 years ago

估计是 win10 的问题吧

tyrozhang commented 5 years ago

这个最新版的xx-net自带openssl模块与操作系统冲突导致,具体原因不知。 解决办法:安装一个新的python,我的是2.7.15,然后改动xx-netXXX\下的start.vbs文件,用安装的python运行即可。具体如下: strArgs = "D:\Python27\python.exe D:\XX-Net-3.10.4\code\3.12.2\launcher\start.py" Set oShell = CreateObject ("Wscript.Shell") oShell.Run strArgs, isConsole(), false

对比一下就知道如何改了。