Open o0HalfLife0o opened 8 years ago
好像可以直接安装吧
我安装不了,提示找不到,然后我去内置源里找,也确实没找到http://downloads.pandorabox.com.cn//pandorabox/packages/mt7620/packages/packages 只在http://mirrors.ustc.edu.cn/openwrt/snapshots/trunk/ramips/mt7620/,这里找到,但是这里提供的好像都不支持安装到外部存储,我安装时只要--dest usb ,最后肯定提示 grep: /usr/lib/opkg/info/python-pyopenssl.control: No such file or directory cat: can't open '/usr/lib/opkg/info/python-pyopenssl.list': No such file or directory 类似这样,虽然安装成功但打不开 而内置源里虽然不是最新,但是安装不会出现这个问题,可是没有pyopenssl
issues 有几位朋友都已经安装成功,你可以看看他们的 issues 的操作过程,参考一下。
这个pyopenssl好像要用opkg install python-pyopenssl安装 但是装完了都运行不起来
我滚回2.7.10,不会提示python not found,但是pyopenssl就是安装不起作用,试着通过pip install,又说openssl已经是最新
手动运行 试试 python proxy.py
python /etc/xx/proxy.py
Traceback (most recent call last):
File "/etc/xx/proxy.py", line 63, in
好像还是 openssl 的问题
是python-pyopenssl的依赖python-cryptography的问题,然而不知道怎么解决,我早上试着直接把python-cryptography的data内容解压到/usr/lib/python2.7/site-packages/,还是不行,这个依赖libffi,但是libffi已经内置了,更新到最新版的libffi还是这个问题,所以就是python-cryptography的问题
我刚刚准备滚回ss时,发现libopenssl不行,于是重装了,然后就想到了py是不是也是因为这个的问题,就有了下面,但是还是出错了,这次错误提示不同,你帮忙看看怎么解决吧@jzp820927 ` [root@PandoraBox_839C:/root]#easy_install pyopenssl Searching for pyopenssl Reading https://pypi.python.org/simple/pyopenssl/ Download error on https://pypi.python.org/simple/pyopenssl/: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:590) -- Some packages may not be found! Couldn't find index page for 'pyopenssl' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading https://pypi.python.org/simple/ Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:590) -- Some packages may not be found! No local packages or download links found for pyopenssl error: Could not find suitable distribution for Requirement.parse('pyopenssl') [root@PandoraBox_839C:/root]#pip install pyopenssl Collecting pyopenssl Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xabe000>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/pyopenssl/ Downloading pyOpenSSL-16.0.0-py2.py3-none-any.whl (45kB) 100% |################################| 45kB 39kB/s Collecting cryptography>=1.3 (from pyopenssl) Downloading cryptography-1.4.tar.gz (399kB) 100% |################################| 401kB 51kB/s Collecting six>=1.5.2 (from pyopenssl) Downloading six-1.10.0-py2.py3-none-any.whl Collecting idna>=2.0 (from cryptography>=1.3->pyopenssl) Downloading idna-2.1-py2.py3-none-any.whl (54kB) 100% |################################| 57kB 248kB/s Collecting pyasn1>=0.1.8 (from cryptography>=1.3->pyopenssl) Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/pyasn1/ Downloading pyasn1-0.1.9-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /usr/lib/python2.7/site-packages (from cryptography>=1.3->pyopenssl) Collecting enum34 (from cryptography>=1.3->pyopenssl) Downloading enum34-1.1.6-py2-none-any.whl Collecting ipaddress (from cryptography>=1.3->pyopenssl) Downloading ipaddress-1.0.16-py27-none-any.whl Collecting cffi>=1.4.1 (from cryptography>=1.3->pyopenssl) Downloading cffi-1.7.0.tar.gz (400kB) 100% |################################| 401kB 48kB/s Complete output from command python setup.py egg_info: unable to execute 'mipsel-openwrt-linux-uclibc-gcc': No such file or directory unable to execute 'mipsel-openwrt-linux-uclibc-gcc': No such file or directory
No working compiler found, or bogus compiler options
passed to the compiler from Python's distutils module.
See the error messages above.
(If they are about -mno-fused-madd and you are on OS/X 10.8,
see http://stackoverflow.com/questions/22313407/ .)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-FcHgA2/cffi `
感觉现在错误大混乱了。建议重刷一次 ow。任何安装下面 Y大 WIki 的流程,重新走一遍。 https://github.com/xyuanmu/XX-Mini/wiki/OpenWrt-%E4%B8%8B%E9%85%8D%E7%BD%AE-XX-Mini https://github.com/xyuanmu/XX-Mini/wiki/No-module-named-OpenSSL
感觉是因为我现在用的pandorabox的缘故,pandorabox官方源没有提供pyopenssl,而openwrt有,但是可能pandorabox编译时改了什么参数导致openwrt和pandorabox的ipk不通用,所以我现在要么换到openwrt要么就是解决上面那个unable to execute 'mipsel-openwrt-linux-uclibc-gcc': No such file or directory这个问题,但是我刚刚试着刷openwrt的最新的snapshots,进不去系统,烦
上次有人说,直接刷 ow 原版的最新开发版,只要 opkg install pyopenssl python-openssl 一条命令,就可以正常运行了,不确定是 pyopenssl 包,还是 python-openssl 包,反正就是这2个当中的一个,你可以试试。 因为我这边没有 ow 系统,所以没法测试,只能你自己试试了。
我下午就是刷的openwrt最新开发板,但是进不去系统,现在刷15.05.1,可以安装python2.7.9,但是还是不能直接opkg安装pyopenssl,pip安装,直接卡死然后被killed,easy_install错误如下 root@OpenWrt:~# easy_install pyopenssl Searching for pyopenssl Reading https://pypi.python.org/simple/pyopenssl/ Download error on https://pypi.python.org/simple/pyopenssl/: ('_ssl.c:565: The handshake operation timed out',) -- Some packages may not be found! Couldn't find index page for 'pyopenssl' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading https://pypi.python.org/simple/ Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] unknown error (_ssl.c:581) -- Some packages may not be found! No local packages or download links found for pyopenssl error: Could not find suitable distribution for Requirement.parse('pyopenssl')
或者可以试试 opkg install python-openssl opkg install python-pyopenssl
可能是内核版本太低还是别的什么,15.05.1的源没有pyopenssl,我就添加trunk的源,安装后还是下午的那些问题,直接安装trunk里的python,提示ash: python not found,安装15.05.1里的python,然后安装trunk里的pyopenssl,就报下面的错误 root@OpenWrt:~# python Python 2.7.9 (default, Jan 27 2016, 17:49:20) [GCC 4.8.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import OpenSSL Traceback (most recent call last): File "
", line 1, in File "/usr/lib/python2.7/site-packages/OpenSSL/init.py", line 8, in from OpenSSL import rand, crypto, SSL File "/usr/lib/python2.7/site-packages/OpenSSL/rand.py", line 12, in from OpenSSL._util import ( File "/usr/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in from cryptography.hazmat.bindings.openssl.binding import Binding File "/usr/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 15, in from cryptography.hazmat.bindings._openssl import ffi, lib ImportError: File not found
原来trunk是没有默认安装luci的,所以我其实成功安装了最新版的trunk,但是最新版的trunk wifi不能加密,一设置加密,wifi就无法启动,所以我就滚回pandorabox了,等过段时间再试试看吧
我安装pyopenssl 0.10.1,xx-mini 1.2.6就好了,唉折腾两天就为了pyopenssl
搞定了?
是的,因为最新版pyopenssl 0.16依赖很多,而且pandorabox和openwrt 15.05.1都不提供最新版,而openwrt trunk提供的最新版可能内核版本太高4.xx,而pandorabox和openwrt 15.05.1内核都只3.xx,所以安装不了,只能安装低版本的pyopenssl,pandorabox刚好有提供0.10的pyopenssl,不需要额外的依赖,所以就直接安装成功了
占用资源、卡网有点厉害,刚刚下win10预览版时,前半分钟网速能2-6m之间波动,之后只剩几百k了,网页也全都打不开,但是换ss的话,就不会这样,可以稳定在4-5m左右,而且打开网页也很流畅,有没有什么办法可以降低卡网
工作原理不一样,SS 就是一个普通代理,XX 要实时扫描IP,也就是会占用较多网线线程和网络资源,如果你的路由硬件配置较低,肯定吃不消。唯一的办法就是,扫描到较多IP的时候,就把扫描线程调到很低,或者直接关掉扫描。
[autorange] threads = 0 这样是不是就是关掉扫描?
[google_ip] max_scan_ip_thread_num = 10 max_good_ip_num = 200
还是这个?
[google_ip] max_scan_ip_thread_num = 10
这个是设置扫描线程,可以试试 设为 1 或者 0
我改成10,不怎么卡网了,速度可以达到最大,但波动还是比较大
你可以 ssh 到路由器上,观察下 CPU 和 内存 的情况,估计还是硬件处理速度跟不上。
内存还有40m的空闲,,负载经常动不动上2,
待机时cpu大部分时间占用1-2,偶尔会10几,没有更大了 需要走代理时cpu占用2-15,最大20-30
持续观察一段时间吧,特别是你感觉开始波动的时候的情况。
在电脑上跑一会儿就能获得几千goodip,然后打开,good_ip.txt,ctrl+f,替换,正则,
.*([0-9]{4}|[abdfhijknpqrtuvxyz]).*\n
替换全部,记得替换后删除空行,就完成了,获得的都是很优质的ip,可以复制到路由器什么的上面,节省路由器跑ip的时间和试错效率
直接把 good_ip.txt 文件传到路由上替换对于文件就行了,用的着,还去替换内容麽。
因为里面很多延迟非常高,好几千啊
XX 是智能的,难道XX还不知道用前面延时低的,会去用后面延时高的吗
我知道为什么卡网了,连接数的原因,只要一上外网,连接数立马2-3k的加,浏览几个页面连接数就上万了,和扫描进程关系不大,因为我现在设置的最大扫描进程只有1,所以和这个没有关系
那你就得检查是什么进程会产生这么高的连接数?
XX-Mini Version : 1.2.7 (python/2.7.10 pyopenssl/16.0.0) Listen Address : :8087 Setting File : manual.ini/proxy.ini
Jul 20 14:25:53.352 - [INFO] SSL use version:TLSv1 Jul 20 14:25:53.358 - [INFO] OpenSSL dont't support npn/alpn, no HTTP/2 supported. Jul 20 14:25:53.563 - [INFO] load ip range file:/etc/xx/ip_range.txt Jul 20 14:25:56.834 - [INFO] load google ip_list num:876, gws num:876 Jul 20 14:25:56.903 - [INFO] good ip num:136, bad ip num:740 Jul 20 14:25:57.103 - [INFO] OpenSSL dont't support npn/alpn, no HTTP/2 supported. 已经安装上pyopenssl16最新版了,为什么还是不支持http/2
openssl version 看看版本号
libopenssl 1.0.2e-1 python-openssl 2.7.10-6
@523860169 https://github.com/XX-net/XX-Net/issues/3536#issuecomment-222363309 看这个,自己测试一下,是否支持。
按他的方法说明是支持的
看这个结果好像是支持。
我也是Y1 我是这样安装python的 先在软件包安装libopenssl 然后在putty下打 opkg install http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/oldpackages/python-mini_2.7.3-2_ralink.ipk wget http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/oldpackages/python_2.7.3-2_ralink.ipk opkg install python_2.7.3-2_ralink.ipk wget http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/oldpackages/python-openssl_2.7.3-2_ralink.ipk opkg install python-openssl_2.7.3-2_ralink.ipk opkg install http://downloads.openwrt.org.cn/PandoraBox/ralink/packages/oldpackages/pyopenssl_0.10-1_ralink.ipk 安装好python然后设置环境变量 export PATH=$PATH:/mnt/sdb1/opkg/usr/bin echo 'export PATH=$PATH:/mnt/sdb1/opkg/usr/bin' >> /etc/profile echo "alias opintall='opkg -d usb install'" >> /etc/profile 能够正常运行XX-Mini 这样安装可以保证python-Mini 和python的版本一样是2.7.3
谢谢分享,其实我已经成功安装好了,并且pyopenssl用的最新 的0.16.0-1,只是不知为何http/2还是不可用而已
确实我觉得不用 http2 只要IP好,也蛮快的
@523860169 pyopenssl在哪裡可以找到?ar71xx版本的.OpenWrt15.05.1系統.
Traceback (most recent call last):
File "proxy.py", line 63, in
按照别人的说法,你应该更换源
求分享