├── thunder_mounts.cfg ├── Xware1.0.31_x86_32_glibc.tar.gz ├── monitor.sh ├── Dockerfile ├── LICENSE └── README.md /thunder_mounts.cfg: -------------------------------------------------------------------------------- 1 | avaliable_mount_path_pattern 2 | { 3 | /data 4 | } -------------------------------------------------------------------------------- /Xware1.0.31_x86_32_glibc.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/top-bettercode/xware/HEAD/Xware1.0.31_x86_32_glibc.tar.gz -------------------------------------------------------------------------------- /monitor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -e "/usr/local/thunder/etc/thunder_mounts.cfg" ] 4 | then 5 | cp /usr/local/thunder/thunder_mounts.cfg /usr/local/thunder/etc/ 6 | fi 7 | 8 | ./portal 9 | pid= 10 | trap '[[ $pid ]] && kill $pid; ./portal -s; exit 0' SIGINT SIGTERM 11 | while : 12 | do 13 | sleep 60 & pid=$! 14 | wait 15 | pid= 16 | 17 | # 监控重启 18 | ps -fe | grep ETMDaemon | grep -v grep 19 | if [ $? -ne 0 ] 20 | then 21 | echo "start process....." 22 | ./portal 23 | else 24 | echo "runing....." 25 | fi 26 | done -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:wheezy-slim 2 | LABEL maintainer='Peter Wu ' 3 | 4 | WORKDIR /xware 5 | 6 | ADD Xware1.0.31_x86_32_glibc.tar.gz /xware 7 | ADD thunder_mounts.cfg /usr/local/thunder/ 8 | 9 | RUN apt-get update && \ 10 | apt-get install -y --no-install-recommends libc6-i386 lib32z1 libncursesw5 libprocps0 procps && \ 11 | chmod u+x portal && \ 12 | apt-get -y autoremove && apt-get clean -y && apt-get autoclean -y && \ 13 | rm -rf var/lib/apt/lists/* var/cache/apt/* var/log/* /xware/*.deb 14 | 15 | VOLUME /data 16 | 17 | ADD monitor.sh /xware 18 | RUN chmod u+x monitor.sh 19 | 20 | CMD ["./monitor.sh"] 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License (MIT) 2 | 3 | Copyright (c) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Docker Image](https://img.shields.io/badge/docker%20image-available-green.svg)](https://hub.docker.com/r/bestwu/xware/) 2 | 3 | # 迅雷远程下载 docker 镜像 4 | 5 | 相关:[迅雷极速版镜像](https://hub.docker.com/r/bestwu/thunderspeed/) 6 | 7 | ## 使用方法 8 | 9 | 指定一个 volume 挂在到 `/data/TDDOWNLOAD` ,xware 所有下载的东西会保存到这个 volume 中。否则下载的东西会保存到容器中。 10 | 11 | ```bash 12 | docker run --name xware -v /data/TDDOWNLOAD:/data/TDDOWNLOAD -d bestwu/xware 13 | ``` 14 | 15 | 之后,第一次运行 xware 需要绑定一下你的迅雷账号,执行 16 | 17 | ```bash 18 | docker logs xware 19 | ``` 20 | 21 | 会看到类似 22 | 23 | ``` 24 | initing... 25 | try stopping xunlei service first... 26 | killall: ETMDaemon: no process killed 27 | killall: EmbedThunderManager: no process killed 28 | killall: vod_httpserver: no process killed 29 | setting xunlei runtime env... 30 | port: 9000 is usable. 31 | 32 | YOUR CONTROL PORT IS: 9000 33 | 34 | starting xunlei service... 35 | Connecting to 127.0.0.1:9000 (127.0.0.1:9000) 36 | setting xunlei runtime env... 37 | port: 9000 is usable. 38 | 39 | YOUR CONTROL PORT IS: 9000 40 | 41 | starting xunlei service... 42 | 43 | getting xunlei service info... 44 | 45 | THE ACTIVE CODE IS: vghqnv 46 | 47 | go to http://yuancheng.xunlei.com, bind your device with the active code. 48 | finished. 49 | ``` 50 | 的内容,把 active code 复制一下,打开 http://yuancheng.xunlei.com 点击 `我的下载器` 旁边的 `添加` 把 active code 输入进去。 51 | --------------------------------------------------------------------------------