• Stars
    star
    700
  • Rank 64,671 (Top 2 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 1 year ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Synology NAS thunder run on Linux

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
  -U, --auth-user <AUTH_USER>          Xunlei authentication username
  -W, --auth-password <AUTH_PASSWORD>  Xunlei authentication password
  -h, --host <HOST>                    Xunlei Listen host [default: 0.0.0.0]
  -p, --port <PORT>                    Xunlei Listen port [default: 5055]
  --uid <UID> Xunlei UID permission    [env: XUNLEI_UID=]
  --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

❯ ./xunlei uninstall --help
Uninstall xunlei

Usage: xunlei uninstall [OPTIONS]

Options:
      --debug  Enable debug
  -c, --clear  Clear xunlei default config directory
  -h, --help   Print help

❯ ./xunlei launcher --help 
Launcher xunlei

Usage: xunlei launcher [OPTIONS]

Options:
      --debug                          Enable debug
  -U, --auth-user <AUTH_USER>          Xunlei authentication username
  -W, --auth-password <AUTH_PASSWORD>  Xunlei authentication password
  -h, --host <HOST>                    Xunlei Listen host [default: 0.0.0.0]
  -p, --port <PORT>                    Xunlei Listen port [default: 5055]
  --uid <UID> Xunlei UID permission    [env: XUNLEI_UID=]
  --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.8.0-28/xunlei-embed-3.8.0-28-aarch64-unknown-linux-gnu.deb

dpkg -i xunlei_3.8.0-28_amd64.deb

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

Docker 运行

docker run -itd --privileged -p 5055:5055 --hostname=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.8.0-28/xunlei_3.8.0-28_aarch64_generic.ipk
wget https://github.com/gngpp/xunlei/releases/download/v3.8.0-28/luci-app-xunlei_1.0.1-7-1_all.ipk
wget https://github.com/gngpp/xunlei/releases/download/v3.8.0-28/luci-i18n-xunlei-zh-cn_1.0.1-7-1_all.ipk

opkg install xunlei_3.8.0-28_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

More Repositories

1

ninja

Reverse engineered ChatGPT proxy
Rust
1,755
star
2

luci-theme-design

LuCI design theme (Suitable for lede)
CSS
312
star
3

js-fuck

无视ip、账号强开gpt-4o
240
star
4

vertx-ddns

基于 Vert.x 的 DDNS 解决方案。自动更新域名解析到本机IP, 支持的DNS服务商: Alidns(阿里云) 、 Dnspod(腾讯云) 、Cloudflare、华为云
Java
133
star
5

vproxy

An easy and powerful Rust HTTP/Socks5 Proxy
Rust
121
star
6

fs

Funcaptcha challenge solver server
Rust
108
star
7

rquest

An easy and powerful Rust HTTP/WebSocket Client featuring TLS/JA3/JA4/HTTP2 fingerprint impersonate
Rust
93
star
8

MSI-MEG-Z490I-Unify-Hackintosh-EFI

🖥 MSI MEG Z490I UNIFY + i9-10850k + Radeon RX5500 XT Hackintosh EFI(OpenCore)
70
star
9

Actions-OpenWrt

Lean♂DHDAXCW Actions OpenWrt for Nanopi R5C/R4SE/X86
Makefile
44
star
10

Asus-ROG-Strix-B460I_OC_Hackintosh-EFI

🖥ASUS ROG STRIX B460-I GAMING RX560 Hackintosh EFI(OpenCore)
C++
32
star
11

cbypass

Bypass C**f** in HTTP proxy
Python
29
star
12

deeplx

DeepL Pro to free API
Rust
25
star
13

pikvm-orangepizero2

PiKVM for orangepizero2
Shell
19
star
14

claude2

Claude2 to OpenAI API
Go
17
star
15

mayi

基于RBAC、OAuth2.1认证模式的微服务动态权限脚手架
Java
15
star
16

luci-app-design-config

LuCI design theme config plugin
Lua
15
star
17

vdns

vdns支持多云平台DNS解析,支持Terminal CLI 方式修改DNS记录,同时以服务形式提供DDNS支持。
Go
14
star
18

gemini

Google Gemini API proxy
Rust
12
star
19

luci-app-watchcat-plus

OpenWrt LuCI watchcat plugins
Lua
10
star
20

qrcode-token

终端QRCode扫码获取阿里云盘Refresh Token
Go
10
star
21

openwrt-scripts

Openwrt packages for Nanopi R4S、360v6
Shell
9
star
22

aliyundrive-cli

阿里云盘 Terminal CLI
Rust
6
star
23

CapSolver-CloudflareBypass

A Python/Node implementation to bypass Cloudflare 5s via capsolver.
Python
6
star
24

wgsdc

WireGuard peer to peer endpoint Service discovery and Configuration plugin
Rust
5
star
25

luci-app-wireguard-ui

WireGuard UI for OpenWrt
Makefile
4
star
26

NanoPi-R4SE

基于 Lean ♂ DHDAXCW 源码的 NanoPi R4SE的 OpenWrt 固件
Shell
3
star
27

vertx-nacos

Vertx服务注册到Nacos的Simple Example
Java
3
star
28

vlog

Golang log library Encapsulation
Go
3
star
29

go-toolkit

golang tool
Go
3
star
30

wg-quick

WireGuard wg-quick for OpenWrt
Makefile
3
star
31

authc

OpenAI Apple PreAuth Cookie Server
3
star
32

rsproxy

A lightweight reverse proxy server written in Rust, supporting HTTP/HTTPS/WebSocket protocols.
Rust
3
star
33

CapSolver-HCAPTCHA-Solver

A Python selenium implementation to bypass hcaptcha via capsolver.
Python
2
star
34

profiles

Script profiles
Rust
1
star
35

wallpaper

基于Jsoup的壁纸爬虫
Java
1
star
36

rurl

Easy CLI HTTP client for Impersonating Chrome/OkHttp request
Rust
1
star
37

ROG-B460I-OC-0.6.5

1
star
38

zeros

Zerotier API Terminal CLI manages lans and provides virtual LAN DNS services
Rust
1
star
39

lede-rockchip-mt7921

1
star
40

mayi-web

Vue
1
star
41

boring

BoringSSL bindings for the Rust programming language.
Rust
1
star