fffonion / Xunlei-Fastdick

迅雷快鸟 Xunlei Network Accelerator For Router
https://yooooo.us/2015/xunlei-fastdick-router
818 stars 179 forks source link

迅雷换端口了? #74

Closed supppig closed 7 years ago

supppig commented 7 years ago

今晚发现不能提速,手动运行了一下swjsq.py,提示如下。

[RT-AC54U /tmp]# python /opt/FastDick/swjsq.py Traceback (most recent call last): File "/opt/FastDick/swjsq.py", line 608, in setup() File "/opt/FastDick/swjsq.py", line 249, in setup API_URL = api_url() File "/opt/FastDick/swjsq.py", line 238, in api_url portal = json.loads(http_req("http://api.portal.swjsq.vip.xunlei.com:81/v2/queryportal")) File "/opt/FastDick/swjsq.py", line 170, in http_req resp = urllib2.urlopen(req, data = body) File "/opt/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/opt/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/opt/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/opt/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/opt/lib/python2.7/urllib2.py", line 1227, in http_open return self.do_open(httplib.HTTPConnection, req) File "/opt/lib/python2.7/urllib2.py", line 1197, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 145] Connection timed out>

懂的英文不多,但是timed out,还有一个网址还是懂的。 ping api.portal.swjsq.vip.xunlei.com ,通! 打开PC版快鸟,程序在挣扎了一分钟后,告诉我提速成功。以前是挣扎了不到1秒钟就提速完成了。 祭出端口扫描器,81端口,关闭 = =! 继续扫,1-9999端口,开放了22和82端口。

浏览器访问http://api.portal.swjsq.vip.xunlei.com:82/v2/queryportal,瞬间出现一堆神奇的代码。

事情很明确了。迅雷关了81端口,但是备用的82端口还是开着。那么,PC迅雷快鸟在连接81端口无果后,转向82端口,提速成功。

然后,修改swjsq.py,批量替换了:81/为:82/,问题解决。

这中秋节还让人过嘛!端口都换了!

fffonion commented 7 years ago

感谢! 14739063243596998

fffonion commented 7 years ago

不对啊,它返回的ip怎么打不开的 http://119.147.41.210:90 难道手动改回 http://119.147.41.210:80

supppig commented 7 years ago

119.147.41.210这个IP我不知道是不是你获取的interface_ip,但是我这里广州电信,获取的interface_ip不是这个,从网页上的结果: 从http://api.portal.swjsq.vip.xunlei.com:81/v2/queryportal(81端口又打开了,迅雷中秋在加班?) {"errno":0,"interface_port":"90","interface_ip":"121.14.82.158","province":"guang_dong","sp":"tel","province_name":"广东","message":"","sp_name":"电信"}

从http://api.portal.swjsq.vip.xunlei.com:82/v2/queryportal {"errno":0,"interface_ip":"121.14.82.158","interface_port":"90","message":"","province":"guang_dong","province_name":"广东","sp":"tel","sp_name":"电信"}

取得的信息,结果是一致的。 这个121.14.82.158,80和90端口,都是开放的。

fffonion commented 7 years ago

对我这里取到的是119.147.41.210,90,而且不开 23333 祝加班小哥中秋快乐

timothyqiu commented 7 years ago

反编译 Android 版以后没有发现 82 端口相关的内容。尝试访问 http://api.portal.swjsq.vip.xunlei.com:81/v2/queryportal 失败两次后,会改为尝试访问 http://api2.portal.swjsq.vip.xunlei.com:81/v2/queryportal 失败两次就放弃尝试,认为不支持提速。

fffonion commented 7 years ago

@timothyqiu 那估计是迅雷手滑了?

ericwang2006 commented 7 years ago

用了最新版本的代码, 还是有timeout的错误 13:31:53 Traceback (most recent call last): File "/opt/FastDick/swjsq.py", line 368, in fast_d1ck _dt_t, _paylod_t = renew_xunlei(dt['userID'], dt['sessionID']) File "/opt/FastDick/swjsq.py", line 236, in renew_xunlei ct = http_req('https://login.mobile.reg2t.sandai.net:443/', body = _payload, headers = header_xl, encoding = 'gbk') File "/opt/FastDick/swjsq.py", line 173, in http_req resp = urllib2.urlopen(req, data = body, timeout = 60) File "/opt/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/opt/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/opt/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/opt/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/opt/lib/python2.7/urllib2.py", line 1240, in https_open context=self._context) File "/opt/lib/python2.7/urllib2.py", line 1197, in do_open raise URLError(err) URLError: <urlopen error [Errno 145] Connection timed out>