GithubHelp home page GithubHelp logo

fffonion / xunlei-fastdick Goto Github PK

View Code? Open in Web Editor NEW
818.0 48.0 180.0 151 KB

迅雷快鸟 Xunlei Network Accelerator For Router

Home Page: https://yooooo.us/2015/xunlei-fastdick-router

Python 99.77% Dockerfile 0.23%
python openwrt router

xunlei-fastdick's Introduction

迅雷快鸟

一个可以运行在路由器的迅雷快鸟(diǎo)和上行提速客户端

在提交issue前,请先阅读须知

快速入门

  • 下载并解压
  • 同目录下新建 swjsq.account.txt,填入用户名,密码,如ahaha,123456(英文逗号),并保存
  • python ./swjsq.py &

详细使用方法

能安装Python的路由器

以小米路由为例

  1. 开启SSH
  2. 安装Python (OpenWRT用户可以安装完整的python包,或者安装python-light, python-codecspython-openssl三个包
  3. swjsq.py通过WinSCP拷贝到路由/data/usr/bin/swjsq,同目录下新建 swjsq.account.txt,填入用户名,密码,如ahaha,123456(英文逗号),并保存
  4. 使用SSH进入目录/data/usr/bin/swjsq,运行$ python ./swjsq.py
  5. 测试运行一次看能否提速,提示Upgrade done: down xxM, up xxM即表示成功。如果只开启了快鸟会员,则只显示down xxM;如果只开启了上行提速会员,则只显示up xxM
  6. 设置自启动 SSH运行vi /etc/rc.local 或者进入LuCI的本地启动脚本界面: 在exit0语句之前加上: nohup python /data/usr/bin/swjsq/swjsq.py >/dev/null 2>&1 &
  7. 重启,稍等几分钟,ssh到路由,使用ps命令查看swjsq是否正常启动,提速是否成功。
  8. 升级路由器固件后,需要重新设置自启动,swjsq一般不需要重新设置,请注意备份swjsq文件。

无法安装Python的路由器

适用于硬件条件有限无法在路由器上安装Python的用户

  1. 在路由器上安装支持https的wget或curl
  2. 在PC上安装Python,2.x或3.x版本均可
  3. 下载swjsq.py,同目录下新建 swjsq.account.txt,填入用户名,密码,如ahaha,123456(英文逗号),并保存
  4. 在PC的命令提示符中进入刚才下载的目录,然后运行python swjsq.py
  5. 提示Upgrade done: down xxM, up %xxM即表示成功登陆成功。如果只开启了快鸟会员,则只显示down xxM;如果只开启了上行提速会员,则只显示up xxM
  6. 安装生成的swjsq_0.0.1_all.ipk,安装后,路由/bin目录将有 swjsq 文件;进入第8步
  7. 如果对路由器/bin目录的修改重启后会丢失,请使用WinSCP手动将前一步中PC上生成的swjsq_wget.sh拷贝到路由器上不会丢失的目录,如/data/usr/bin,并更名为swjsq;进入第9步
  8. 设置自启动,在路由器的启动项界面将swjsq设置为已启用;进入第10步
  9. 手动修改启动项: SSH运行vi /etc/rc.local或者进入LuCI的本地启动脚本界面: 在exit0语句之前加上: nohup /bin/swjsq >/dev/null 2>&1 & 前一步中如果手动拷贝了swjsq_wget.sh,此处应改为: nohup /data/usr/bin/swjsq >/dev/null 2>&1 & 进入第10步
  10. 重启,稍等几分钟,ssh到路由,使用ps命令查看swjsq是否正常启动,或者在路由器系统进程界面查找是否存在{swjsq} /bin/ash /bin/swjsq进程;检查提速是否成功。
  11. 升级路由器固件后,需要重新设置自启动,swjsq一般不需要重新设置,请注意备份swjsq文件。

Docker

下载最新 docker镜像

$ docker pull fffonion/xunlei-fastdick

群晖用户可以直接从套件->Docker->注册表中搜索xunlei-fastdick并下载;如果拉取失败,可以登录SSH后运行上述命令。

或者使用DaoCloud镜像

$ docker pull daocloud.io/fffonion/xunlei-fastdick

指定环境变量作为启动参数

$ docker run -d --name=xunlei-fastdick --restart=unless-stopped -e XUNLEI_UID=<uid> -e XUNLEI_PASSWD=<uid> fffonion/xunlei-fastdick

如果上一步使用了DaoCloud镜像

$ docker run -d --name=xunlei-fastdick --restart=unless-stopped -e XUNLEI_UID=<uid> -e XUNLEI_PASSWD=<uid> daocloud.io/fffonion/xunlei-fastdick

编译基于arm32v7内核的镜像(例如运行在树莓派上)

编译

$ docker build -f Dockerfile.arm32v7 -t yourname/xunlei-fastdick .

运行

$ docker run -d \
    --name=xunlei-fastdick \
    --restart=unless-stopped \
    -e XUNLEI_UID=<uid> \
    -e XUNLEI_PASSWD=<uid> \ 
    yourname/xunlei-fastdick

说明

  • 生成的swjsq_wget.shswjsq_0.0.1_all.ipk包含了账户信息,请不要共享给他人使用
  • 程序会查询快鸟和上行提速的到期时间,并自动选择是否开启快鸟提速和上行提速功能
  • 第一次登陆成功后,用户名和密码会明文保存在.swjsq.session文件中。如果需要更换账号,只需新建一个 swjsq.account.txt,并重新运行python脚本
  • 如果修改或更新了python脚本,下次运行时将重新生成ipk包和swjsq_wget.sh,请重新安装ipk或拷贝swjsq_wget.sh到路由器
  • 会员权限及月加速流量等详见这里
  • 自带这里抄的纯python实现RSA加密,可选安装pycrypto加快(首次)运算速度

同类产品

xunlei-fastdick's People

Contributors

4ft35t avatar aa65535 avatar bingyuxq avatar fffonion avatar flier avatar lonlykids avatar malash avatar nenightelves avatar senorsen avatar timothyqiu avatar ywb94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xunlei-fastdick's Issues

关于api_url查询的一个逻辑小问题

发现了一个bug。
在生成的swjsq_wget的脚本里面, api_url="http://$portal_ip:$portal_port/v2"这一行应该放在紧接下来的 if [ -z "$portal_ip" ] 那个 block 的后面。
你放在了这个block的前面,导致第一次查询失败之后,就算等了30秒再查询,查询出了正确的结果,也不能写入$api_url里面

报错Error: get interface_ip failed

所使用的版本:Python
运行的系统环境及版本:Win10 1607,Python 3.5.2
包含错误信息的日志:
Warning: pycrypto not found, use pure-python implemention
Error: get interface_ip failed
产生错误的操作步骤:cmd执行python swjsq.py
运营商:湖北电信
打开http://api.portal.swjsq.vip.xunlei.com:81/v2/queryportal显示的内容如下
{"errno":520,"interface_port":"","interface_ip":"","province":"","sp":"","province_name":"","message":"ip check error:27.23.228.12 ret:-1","sp_name":""}

session is empty

运行几天后突然就不行了,再次登录路由器运行(重启再运行,重装再运行),都提示session is empty ,请问有什么解决办法吗?(PS:在PC端用python运行swjsq.py 是可以提速,但是在路由上就不行 ,老是提示session is empty)求搭救。

wget.sh里请求 login.mobile.reg2t.sandai.net 的返回结里带中文,导致grep部分失效

这个的结果大概是这样的

{
   "errorCode" : 0,
   "userNewNo" : [迅雷ID],
   "jumpKey" : "[blah bhal]",
   "payName" : "商务合作付费",
   "expireDate" : "[VIP过期时间]",
   "sessionID" : "[sessionID]",
   "userName" : "[用户名]",
   "cmdID" : 2,
   "platformVersion" : 1,
   "isVip" : 1,
   "vasType" : 4,
   "account" : 138305,
   "userID" : [数字],
   "payId" : 801,
   "isCompressed" : 0,
   "sequenceNo" : 1000001,
   "protocolVersion" : 101,
   "nickName" : "[昵称]"
}

就是那个payName,是GB2312编码的,会导致grep不能获得 userID。sessionID 因为在中文之前,所以还没什么问题。

我是OS X的bash环境, LANG=en_US.UTF-8 ,可能和其它的测试环境不一样。

nohup

没有nohup命令,怎么安装nohup呢,yum也木有

u'not exist channel错误……

你好,我是安装在QNAP的NAS上,其中swjsq_0.0.1_all.ipk安装后产生的swjsq无法正常运行,swjsq_wget.sh运行后无效果,我是直接用以下语句建了个sh直接让swjsq.py运行的(虚拟为qpkg以便开机启动):

!/bin/sh

QPKG_NAME="Xunlei-FastDick"
cd /share/HDA_DATA/.qpkg/Xunlei-FastDick
/share/HDA_DATA/.qpkg/Python/bin/python /share/HDA_DATA/.qpkg/Xunlei-FastDick/swjsq.py --daemon
运行正常时能正常加速,现在的问题是运行一段时间后出现结尾为u'not exist channel的错误,且经测试此时已无加速效果。
请问此错误代表什么含义?有无可能的解决方法?
谢谢。

运行脚本出现如此提示,请问是什么原因?谢谢。

C:\xl>python swjsq.py
Warning: pycrypto not found, use pure-python implemention
Warning: you are probably not xunlei vip, buy buy buy!
[Debug] isVip:0 payId:0 payName:[u'----']
Login xunlei succeeded
Traceback (most recent call last):
File "swjsq.py", line 503, in
fast_d1ck(uid, hashlib.md5(pwd).hexdigest(), TYPE_NORMAL_ACCOUNT)
File "swjsq.py", line 271, in fast_d1ck
make_wget_script(dt['userID'], pwd, _dial_account, _payload)
File "swjsq.py", line 422, in make_wget_script
ret=$HTTP_REQ "$api_url/keepalive?peerid=$peerid&userid=$uid&sessionid=$ses sion&client_type=android-swjsq-'''+APP_VERSION+'''&time_and=$_ts&client_version= androidswjsq-'''+APP_VERSION+'''&os=android-5.0.1.24SmallRice&dial_account='''+d ial_account+'''"
TypeError: coercing to Unicode: need string or buffer, int found

报错 Error 724: client request abnormal, blocked

  • 所使用的版本:Python
  • 运行的系统环境及版本:Windows 8.1 ,Python 2.7.11
  • 产生错误的操作步骤:执行
  • 运营商所在地:吉林长春

E:\My Documents\Desktop\Xunlei-Fastdick-master>swjsq.py
Warning: pycrypto not found, use pure-python implemention
Login xunlei succeeded
To Upgrade: 吉林电信 Down 8M -> 10M, Up 8M -> 10M
Initializing upgrade
Error 724: client request abnormal, blocked

今天失效了?

之前都用得好好的。。。

D:\Program Files (x86)\Xunlei-FastDick
λ "D:\Program Files (x86)\pypy\pypy.exe" swjsq.py
Warning: pycrypto not found, use pure-python implemention
Login xunlei succeeded
Traceback (most recent call last):
  File "swjsq.py", line 455, in <module>
    fast_d1ck(uid, hashlib.md5(pwd).hexdigest(), TYPE_NORMAL_ACCOUNT)
  File "swjsq.py", line 236, in fast_d1ck
    _ = api('bandwidth', dt['userID'])
  File "swjsq.py", line 204, in api
    return json.loads(http_req(url, headers = header_api))
  File "swjsq.py", line 149, in http_req
    resp = urllib2.urlopen(req, data = body)
  File "D:\Program Files (x86)\pypy\lib-python\2.7\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "D:\Program Files (x86)\pypy\lib-python\2.7\urllib2.py", line 431, in open
    response = self._open(req, data)
  File "D:\Program Files (x86)\pypy\lib-python\2.7\urllib2.py", line 449, in _open
    '_open', req)
  File "D:\Program Files (x86)\pypy\lib-python\2.7\urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "D:\Program Files (x86)\pypy\lib-python\2.7\urllib2.py", line 1235, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "D:\Program Files (x86)\pypy\lib-python\2.7\urllib2.py", line 1197, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。>

大神是不是 迅雷又抽风了啊

还有就是我用新脚本生成的话会出错
File "swjsq.py", line 5

^
SyntaxError:invalid syntax
不知道怎么回事 Python2.7 也重新安装了

重复显示 " session is empty "?

session is empty
--2015-10-18 10:50:32-- https://login.mobile.reg2t.sandai.net/
Resolving login.mobile.reg2t.sandai.net... 123.150.173.198
Connecting to login.mobile.reg2t.sandai.net|123.150.173.198|:443... connected.
WARNING: cannot verify login.mobile.reg2t.sandai.net's certificate, issued by '/C=CN/ST=shenzhen/L=sz/O=xl\x08/OU=huiyuan/CN=xl':
Self-signed certificate encountered.
WARNING: certificate common name 'xl' doesn't match requested host name 'login.mobile.reg2t.sandai.net'.
HTTP request sent, awaiting response... 200 OK
Length: 177 [application/octet-stream]
Saving to: 'STDOUT'

输出内容报编码错误

部分server返回的内容会报编码错误:

Traceback (most recent call last):
File "swjsq.py", line 380, in
fast_d1ck(uid, pwd_md5, TYPE_NUM_ACCOUNT, save = False)
File "swjsq.py", line 216, in fast_d1ck
_['max_bandwidth']['upstream']/1024,
UnicodeEncodeError: 'ascii' codec can't encode characters in position 12-15: ordinal not in range(128)

debian7上不能用?

root@MyServer:~# python ./swjsq.py
Warning: pycrypto not found, use pure-python implemention
Error: get interface_ip failed

求合并快鸟源码

哥们你好,我在今年2月份的时候照着你当时的版本做了另一个迅雷快鸟的openwrt 的ipk,地址在这,https://github.com/zz090923610/thunder-fastNiao ,完完全全照着刻板的openwrt package的架构搞的,比你的可能多了点Luci 的UI,还有/etc/init.d/下的一些逻辑,缺点是依赖了六个软件包。。。然后现在我马上要出国了,目测没时间继续维护了,而且五月份迅雷换协议之后我也没顾得上更新,所以想跟你商量下,看看我这源码里你哪些部分能用就用了吧,这坑可能我就弃了。。。

报告最近的一个问题。

最近版本的py文件生成的swjsq_get.sh文件开头的 #!/bin/ash 会导致路由不能启动脚本,提示not found,改成 #!/bin/sh 就好了。路由是ar71xx的石像鬼固件。

感谢分享,特别好用,咨询一点菜鸟问题

您好,我用了您的这个swjsq.py确实好用,也安装在了路由里面(wndr3800,openwrt)。
问题是:
1.可能我的openwrt系统不稳定,这个程序不是一直处于运行状态,经常过一夜就不再提速。这就带来了问题2
2.我现在启动swjsq的方式都是使用windows下的putty或者mac os下的终端,想咨询一下在openwrt的LuCI界面里有没有直接启动程序的方法呢?
万望赐教,不胜感激TAT

Error: can not upgrade, so sad TAT 后端服务错误:从外部系统查询用户基础带宽异常,return:-21511

Login xunlei succeeded
Error: can not upgrade, so sad TAT 后端服务错误:从外部系统查询用户基础带宽异常,return:-21511

今天才出现这个错误,昨天都还好好的(准确的说是直到凌晨都正常)。

log里显示的是:
12:06:28 Traceback (most recent call last):
File "/share/HDA_DATA/.qpkg/Xunlei-FastDick/swjsq.py", line 277, in fast_d1ck
print('Error: %s' % _['message'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-28: ordinal not in range(128)

迅雷快鸟需要输入验证码,大神有办法绕开吗?

这两天快鸟又失效了,查看了下是账号异常需要输入验证码,只有快鸟会这样,电脑端的快鸟也是,但是迅雷客户端不会弹验证码。手机端的快鸟也不会,有没可能像手机端的快鸟那样绕开验证码呢?

小米版失效

今天发现小米版ipk失效,以下是 py模式下的的错误的代码
Login xunlei succeeded
To Upgrade: *** Down 20M -> 30M, Up 2M -> 100M
Initializing upgrade
Error: channel error:tel_proxy timeout
付:maste版正常

docker无法获取最新的镜像

我用
docker pull flier/xunlei-fastdick
提示
Tag latest not found in repository docker.io/flier/xunlei-fastdick

所以只能用docker pull flier/xunlei-fastdick:flier_docker才可以获取镜像。
还有貌似这两天的加速没效果了。我也重启了这个docker还是不行。

IPK文件LUCI界面

请问大神能否制作成一个IPK文件,直接可以在LUCI里安装和操作?多谢多谢~

12小时前的新版本 win平台使用python文字报错

新版本返回消息输出时带有参数(' encode("utf-8") '), cmd命令提示符下输出消息乱码。
平台:Windows10 X64
Python版本: 2.7.6
正常帐号登录提示:Error: login failed, 您的帐号存在异常,请登录安全中心确认!

Openwrt运行python版本报错

很可惜,无法升级:业务处理错误:用户线路暂不具备提速能力

Traceback (most recent call last):
  File "swjsq.py", line 411, in <module>
    fast_d1ck(uid, hashlib.md5(pwd).hexdigest(), TYPE_NORMAL_ACCOUNT)
  File "swjsq.py", line 209, in fast_d1ck
    print('Error: can not upgrade, so sad TAT %s' % _['message'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 35-53: ordinal not in range(128)

change

print('Error: can not upgrade, so sad TAT %s' % _['message']) 

->

print('Error: can not upgrade, so sad TAT %s' % _['message'].encode('utf-8'))

你好,因为某个需求,这个可以实现运行后只登录,不自动开始加速吗?

可不可以实现,运行之后,只登录不自动开始加速,由手动控制加速或者停止。
想设置成 5分钟自动停止一次,开始加速一次,通过任务计划。

我们这里的情况是:加速后,前5分钟加速到100M,后面降到50M。所以想问一下,这个可以实现如下过程:加速之后,。运行4分钟,自动停止。之后再加速。一直循环!
5分钟重启一次 快鸟进程不行。
所以。。。
不吝赐教

很多错误

以py模式运行报错:UnicodeEncodeError: 'ascii' codec can't encode characters
以ipk模式运行'报错':
Connecting to api.portal.swjsq.vip.xunlei.com:81 (61.155.183.136:81)

是不是PY的版本一定要高于2.7.9+

speedup server already speed up

root@Morz:~python swjsq.py
Login xunlei succeeded
To Upgrade: 辽宁电信 Down 4M -> 30M, Up 4M -> 100M
Initializing upgrade
Error: speedup server already speed up

rooot@Morz:~/Xunlei-FastDick# ./*.sh
--2015-12-10 21:36:33-- https://login.mobile.reg2t.sandai.net/
正在解析主机 login.mobile.reg2t.sandai.net (login.mobile.reg2t.sandai.net)... 123.150.173.198
正在连接 login.mobile.reg2t.sandai.net (login.mobile.reg2t.sandai.net)|123.150.173.198|:443... 已连接。
警告: “login.mobile.reg2t.sandai.net” 的证书不可信。
警告: “login.mobile.reg2t.sandai.net” 的证书颁发者未知。
证书所有者与主机名 “login.mobile.reg2t.sandai.net” 不符
已发出 HTTP 请求,正在等待回应... 200 OK
长度:177 [application/octet-stream]
正在保存至: “STDOUT”

  •                         100%[=================================================>]     177  --.-KB/s  用时 0s  
    

2015-12-10 21:36:34 (50.1 MB/s) - 已写入至标准输出 [177/177]

session is empty
--2015-12-10 21:36:39-- https://login.mobile.reg2t.sandai.net/
正在解析主机 login.mobile.reg2t.sandai.net (login.mobile.reg2t.sandai.net)... 123.150.173.198
正在连接 login.mobile.reg2t.sandai.net (login.mobile.reg2t.sandai.net)|123.150.173.198|:443... 已连接。
警告: “login.mobile.reg2t.sandai.net” 的证书不可信。
警告: “login.mobile.reg2t.sandai.net” 的证书颁发者未知。
证书所有者与主机名 “login.mobile.reg2t.sandai.net” 不符
已发出 HTTP 请求,正在等待回应... 200 OK
长度:177 [application/octet-stream]
正在保存至: “STDOUT”

  •                         100%[=================================================>]     177  --.-KB/s  用时 0s  
    

2015-12-10 21:36:39 (40.7 MB/s) - 已写入至标准输出 [177/177]

session is empty

结果 并没有成功加速 原先py的还能用 现在的py的也不行了
脑版加速可用

Win命令行CTRL+C退出

Traceback (most recent call last):
  File "E:\dev\python-2.7.10.amd64\lib\atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "swjsq.py", line 219, in <lambda>
    atexit.register(lambda: api('recover', dt['userID'], dt['sessionID']))
  File "swjsq.py", line 179, in api
    return json.loads(http_req(url, headers = header_api))
  File "swjsq.py", line 129, in http_req
    resp = urllib2.urlopen(req, data = body)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 431, in open
    response = self._open(req, data)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 449, in _open
    '_open', req)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 1227, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 1200, in do_open
    r = h.getresponse(buffering=True)
  File "E:\dev\python-2.7.10.amd64\lib\httplib.py", line 1132, in getresponse
    response.begin()
  File "E:\dev\python-2.7.10.amd64\lib\httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "E:\dev\python-2.7.10.amd64\lib\httplib.py", line 409, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "E:\dev\python-2.7.10.amd64\lib\socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
Error in sys.exitfunc:
Traceback (most recent call last):
  File "E:\dev\python-2.7.10.amd64\lib\atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "swjsq.py", line 219, in <lambda>
    atexit.register(lambda: api('recover', dt['userID'], dt['sessionID']))
  File "swjsq.py", line 179, in api
    return json.loads(http_req(url, headers = header_api))
  File "swjsq.py", line 129, in http_req
    resp = urllib2.urlopen(req, data = body)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 431, in open
    response = self._open(req, data)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 449, in _open
    '_open', req)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 1227, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "E:\dev\python-2.7.10.amd64\lib\urllib2.py", line 1200, in do_open
    r = h.getresponse(buffering=True)
  File "E:\dev\python-2.7.10.amd64\lib\httplib.py", line 1132, in getresponse
    response.begin()
  File "E:\dev\python-2.7.10.amd64\lib\httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "E:\dev\python-2.7.10.amd64\lib\httplib.py", line 409, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "E:\dev\python-2.7.10.amd64\lib\socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt

e:\Program Files\Thunder Network>

session is empty

root@Hiwifi:# killall -9 swjsq
root@Hiwifi:
# (/bin/swjsq &)
root@Hiwifi:~# login xunlei
session is empty
login xunlei
session is empty
login xunlei
session is empty
login xunlei
session is empty
login xunlei
session is empty


大神,这个怎么破,刚安装的时候是可以的,运行几天就这样了;路由器每天重启,会不会和这个有关系?

大神 运行脚本失败啊

安装好Python27 运行后出现
c:\python27> python swjsq.py &
File "swjsq.py", line 5

^
SyntaxError: invalid syntax
怎么回事呢 下载的最新的swjsq.py

PC上生成ipk时出错

python 3.5.1,Win7 SP1 64bit,执行“python swjsq.py”后出现以下错误

Warning: pycrypto not found, use pure-python implemention
Traceback (most recent call last):
File "swjsq.py", line 559, in
fast_d1ck(uid, hashlib.md5(pwd).hexdigest(), TYPE_NORMAL_ACCOUNT)
File "swjsq.py", line 260, in fast_d1ck
dt, _payload = login_xunlei(uname, pwd, login_type)
File "swjsq.py", line 176, in login_xunlei
fake_device_id = hashlib.md5("%s23333" % pwd_md5).hexdigest() # just generate a 32bit string
TypeError: Unicode-objects must be encoded before hashing

小米路由mini开发版2.5.7不再支持wget https安全连接,脚本无法运行

最近迅雷快鸟官方的加速插件上架了,但是还没这个脚本好用,经常提速失效,需要进插件重新提速,其中每天早上7点必然失效。于是继续用脚本。
这次更新更新了busybox,wget有重大变化,wget的输出没了,没法提取连接信息了,wget也不能wget https安全连接了,导致直接没法连接迅雷加速服务器。
或许可以替换回上个版本的busybox,但是系统是read only的,据网上反馈,小米好像做了限制,重新mount也不能mount rw,或许把上个版本的busybox提取放到U盘运行?
又或许可以另外安装个wget,我这里opkg update卡住,好像连接不上源。而且小米限制修改系统,只能安装到U盘,到时候也会很麻烦。
总之先退回上个版本系统吧,反正这个版本还挺稳定。

swjsq_wget.sh说提速了,但是迅雷那边表示我并未提速,实际上也没提速

我把swjsq_wget.sh第一行的ash改成bash,然后放在OS X下运行。好像提速效果隔夜就会消失。
同时stdout里面留下的纪录都是这样的。

session is 37C1B123F3FE81EAFB7DE67FCCE50FC5
uid is [一串数字]
{"errno":812,"message":"speedup server already speed up","sequence":0,"timestamp":1444991314}
session is A1364572FF951A4CBAF4F737F0FCCA96
uid is [一串数字]
{"errno":812,"message":"speedup server already speed up","sequence":0,"timestamp":1444992942}
session is 0E42A677FAEF43CE049FC54F69838CF0
uid is [一串数字]
{"errno":812,"message":"speedup server already speed up","sequence":0,"timestamp":1444994570}
session is 0A2CF52ADA6682A850E7F886057FC187
uid is [一串数字]
{"errno":812,"message":"speedup server already speed up","sequence":0,"timestamp":1444996198}
session is F913D44546C6D71D3DCA199B5A92C1A2
uid is [一串数字]
{"errno":812,"message":"speedup server already speed up","sequence":0,"timestamp":1444997825}

然后运行 python swjsq.py 也提示已经提速,但是就是没效果,同时用迅雷那边提供的软件看,会说我没有提速。
ctrl-c结束 swjsq.py,会提示sending recover request

之后再运行python swjsq.py,或者 ./swjsq_wget.sh,就能重新获得加速效果。

运行后提示一下错误

运行后提示一下错误,求解
C:\Python27>python.exe swjsq.py
Traceback (most recent call last):
File "swjsq.py", line 446, in
uid, pwd = open(account_file_plain).read().strip().split(',')
ValueError: need more than 1 value to unpack

swjsq_wget.sh是必须的文件?

如果路由器硬件限制无法安装Python,也可以在PC上运行脚本,登陆成功后会生成swjsq_wget.sh以及一个ipk包,将生成的ipk安装进路由器即可;需要路由器安装支持https的wget或curl

swjsq_wget.sh这个需要放到路由器里面?还是说ipk安装后就可以了?
之前的账号信息是否已经整合到ipk里面了?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.