迅雷本来只有windows版本,对应的linux版本一直都是在wine下实现的,在ubuntu下我是采用crossover实现的,具体如何进行wine迅雷参考链接。但是迅雷终于在路由大潮里面开发了linux软件,生产了xware固件进行路由下载,恰好出了x86_glibc版本,如此,这个固件就能在ubuntu上运行,这个固件只是一个后台程序,依靠网络界面控制。

首先去迅雷路由界面进行固件下载,点击进入,当前最新版本是Xware1.0.26_x86_32_glibc.zip ,注意下载的选择的是x86 glibc版本,文件如下:

$ XwareDesktop/xware $ ls
EmbedThunderManager ETMDaemon portal vod_httpserver

然后执行./portal

$ sudo /opt/xware/portal
initing...
try stopping xunlei service first...
killall: ETMDaemon: no process killed
killall: EmbedThunderManager: no process killed
killall: vod_httpserver: no process killed
setting xunlei runtime env...
port: 9000 is usable.

YOUR CONTROL PORT IS: 9000

starting xunlei service...
etm path: /opt/xware
execv: /opt/xware/lib/ETMDaemon.

getting xunlei service info...
Connecting to 127.0.0.1:9000 (127.0.0.1:9000)
the active key is not valid.

try again...(has tried 1 time(s)).
getting xunlei service info...
Connecting to 127.0.0.1:9000 (127.0.0.1:9000)
the active key is not valid.

try again...(has tried 2 time(s)).
getting xunlei service info...
Connecting to 127.0.0.1:9000 (127.0.0.1:9000)
the active key is not valid.

try again...(has tried 3 time(s)).
getting xunlei service info...
Connecting to 127.0.0.1:9000 (127.0.0.1:9000)
the active key is not valid.

try again...(has tried 4 time(s)).
getting xunlei service info...
Connecting to 127.0.0.1:9000 (127.0.0.1:9000)
the active key is not valid.

try again...(has tried 5 time(s)).
getting xunlei service info...
Connecting to 127.0.0.1:9000 (127.0.0.1:9000)
#下面的code值需要记住
THE ACTIVE CODE IS: BP4KZO
go to http://yuancheng.xunlei.com, bind your device with the active code.
finished.

然后登陆到迅雷远程http://yuancheng.xunlei.com/,用迅雷账号登陆后,在高清播放机中添加激活码,如下

迅雷下载

添加成功后如下:
LInux迅雷下载

点击新添加的(上图红框),然后就可以点击下载了,但这还没配置完,如果此时点击下载,会发现提示“没有挂载磁盘”。

linux迅雷下载

这个时候会提醒你没有挂在磁盘,所以此时需要挂在磁盘,如

mount --bind /home/oenhan /mnt/xldown

/home/oenhan和/mnt/xldown都是假定的名字,在xware/下创建etc目录,创建thunder_mounts.cfg文件

xware/cfg $ cat thunder_mounts.cfg
avaliable_mount_path_pattern
{
/mnt/xldown
}

/home/oenhan虽然是指定的任意目录,但实际下载文件在该目录所在的设备根目录下的TDDOWNLOAD中,具体下载文件尝试一下就清楚了,这个应该是xware的一个bug。
这样配置就OK,最后写个脚本放到/usr/bin下面统一处理

#!/bin/bash

case "$1" in
    start)
mkdir -p /mnt/xldown
mount --bind /home/oenhan /mnt/xldown
/opt/xware/portal
    ;;
    stop)
    killall ETMDaemon EmbedThunderManager vod_httpserver
    ;;
    *)
    exit 0
    ;;
esac

xware默认用的是web界面,而已经有人开发出来了前端的qt界面了,就是XwareDesktop,源代码以及编译,不过只支持ubuntu 14.04以上,如果你用12.04还是用webui吧。我在百度云盘编译了14.04版本的deb包,点击进入下载


Linux下使用原生迅雷下载文件来自于OenHan

链接为:http://oenhan.com/linux-xware-xun-lei

发表回复