1 Star 7 Fork 0

gngpp / xunlei

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

xunlei

CI Docker Image

xunlei从迅雷群晖套件中提取,用于发行版Linux(支持OpenWrt/Alpine/Docker)的迅雷远程下载服务。仅供测试,测试完请自觉删除。

  • 支持X86_64/aarch64
  • 支持glibc/musl
  • 支持更改下载目录
  • 支持面板认证
  • 支持以特定用户安装(UID/GID)
  • Docker镜像最小压缩(40MB左右)
  • 支持插件:NAS小星(pcdn),测速插件
  • 内侧邀请码(3H9F7Y6D/迅雷牛通),内侧码申请快速通道:https://t.cn/A6fhraWZ

默认Web访问端口5055

❯ ./xunlei                   
Synology Nas Thunder runs on Linux

Usage: xunlei [OPTIONS] <COMMAND>

Commands:
  install    Install xunlei
  uninstall  Uninstall xunlei
  launcher   Launcher xunlei
  help       Print this message or the help of the given subcommand(s)

Options:
  -d, --debug    Enable debug
  -h, --help     Print help
  -V, --version  Print version

❯ ./xunlei install --help
Install xunlei

Usage: xunlei install [OPTIONS]

Options:
      --debug
          Enable debug [env: XUNLEI_DEBUG=]
  -u, --auth-user <AUTH_USER>
          Xunlei authentication username [env: XUNLEI_AUTH_USER=]
  -w, --auth-password <AUTH_PASSWORD>
          Xunlei authentication password [env: XUNLEI_AUTH_PASSWORD=]
  -H, --host <HOST>
          Xunlei Listen host [env: XUNLEI_HOST=] [default: 0.0.0.0]
  -P, --port <PORT>
          Xunlei Listen port [env: XUNLEI_PORT=] [default: 5055]
  -U, --uid <UID>
          Xunlei UID permission [env: XUNLEI_UID=]
  -G, --gid <GID>
          Xunlei GID permission [env: XUNLEI_GID=]
  -c, --config-path <CONFIG_PATH>
          Xunlei config directory [default: /opt/xunlei]
  -d, --download-path <DOWNLOAD_PATH>
          Xunlei download directory [default: /opt/xunlei/downloads]
  -m, --mount-bind-download-path <MOUNT_BIND_DOWNLOAD_PATH>
          Xunlei mount bind download directory [default: /xunlei]
  -h, --help
          Print help

Ubuntu(Other Linux)

GitHub Releases 中有预编译的 deb包/rpm包,二进制文件,以Ubuntu为例:

wget https://github.com/gngpp/xunlei/releases/download/v3.11.2-32/xunlei-embed-3.11.2-32-aarch64-unknown-linux-gnu.deb

dpkg -i xunlei_3.11.2-32_amd64.deb

# 安装和运行迅雷程序
xunlei install
# 停止和卸载迅雷程序
xunlei uninstall
# 如果你的系统不支持systemd,则手动启动
xunlei launcher

Docker 运行

docker run -it --rm --privileged -p 5055:5055 --name=xunlei \
  -v $(pwd)/data:/opt/data \
  -v $(pwd)/downloads:/downloads \
  -e XUNLEI_AUTH_USER=admin \
  -e XUNLEI_AUTH_PASSWORD=admin \
  gngpp/xunlei:latest

OpenWrt 路由器

GitHub Releases 中有预编译的 ipk 文件, 目前提供了 aarch64/x86_64 等架构的版本,下载后使用 opkg 安装,以 nanopi r4s 为例:

wget https://github.com/gngpp/xunlei/releases/download/v3.11.2-32/xunlei_3.11.2-32_aarch64_generic.ipk
wget https://github.com/gngpp/xunlei/releases/download/v3.11.2-32/luci-app-xunlei_1.0.1-7-1_all.ipk
wget https://github.com/gngpp/xunlei/releases/download/v3.11.2-32/luci-i18n-xunlei-zh-cn_1.0.1-7-1_all.ipk

opkg install xunlei_3.11.2-32_aarch64_generic.ipk
opkg install luci-app-xunlei_1.0.1-7-1_all.ipk
opkg install luci-i18n-xunlei-zh-cn_1.0.1-7-1_all.ipk

自行编译

git clone https://github.com/gngpp/xunlei && cd xunlei

# 默认编译在线安装
cargo build --release && mv target/release/xunlei .

# 完整打包编译安装
bash +x ./unpack.sh && cargo build --release --features embed && mv target/release/xunlei .

# 执行安装
./xunlei install
# 若系统不支持systemd,则手动启动daemon
./xunlei launcher

OpenWrt编译

cd package
svn co https://github.com/gngpp/xunlei/trunk/openwrt
cd -
make menuconfig # choose LUCI->Applications->luci-app-xunlei  
make V=s

FQA

  • openwrt如果启动有问题,先执行service xunlei disable && service xunlei enable,清除以前安装过的迅雷包缓存(可能别人打包也叫xunlei,会有init.d缓存),不行再开debug模式看日志,最好新装重启一次
  • musl运行库的操作系统,若已存在glibc运行库,那么会优先兼容选择使用操作系统运行库环境(避免对系统其他软件依赖冲突,可能会缺依赖,自行补全)
  • 指定运行LD加载库或压缩目前无法做到(二进制带签名),需要逆向打patch
  • 插件依赖bash,系统需要安装bash
MIT License Copyright (c) 2023 gngpp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Linux迅雷下载服务(支持glibc/musl) 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Rust
1
https://gitee.com/gngpp/xunlei.git
git@gitee.com:gngpp/xunlei.git
gngpp
xunlei
xunlei
main

搜索帮助