标签 q'bittorrent 下的文章

1、安装entware
wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | sh
常见软件列表 entware.net
2、设置开机启动entware ,触发任务,添加以下代码

!/bin/sh

Mount EntWare

mkdir -p /opt
mount -o bind /volume1/@Entware/opt /opt
/opt/etc/init.d/rc.unslung start

Add EntWare Profile in Global Profile

if grep -qF '/opt/etc/profile' /etc/profile; then
echo "Confirmed: EntWare Profile in Global Profile"
else
echo "Adding: EntWare Profile in Global Profile"
cat >>/etc/profile <<"EOF"

Load EntWare Profile

[ -r "/opt/etc/profile" ] && . /opt/etc/profile
EOF
fi

Configure EntWare Mirror

sed -i 's|https?://bin.entware.net|https://mirrors.bfsu.edu.cn/entware|g' /opt/etc/opkg.conf

Update EntWare List

/opt/bin/opkg update

3、安装qbittorret :opkg install qbittorret
安装 rustdesk;opkg install rustdest-sever ,ID服务器默认端口21116,中继服务器默认端口21117,如有防火墙记得添加,软路由开启端口转发就可以外网打洞。不需要任何配置,一切默认。

4、建立要在 Entware 启动项中添加 qBittorrent 和 RustDesk(hbbs 和 hbbr)的开机启动程序,

确认 qBittorrent、hbbs 和 hbbr 的安装路径

which qbittorrent-nox
which hbbs
which hbbr
创建启动脚本

创建一个新的脚本文件,/opt/etc/init.d/S99start_apps.sh(这里 S99 是启动脚本的执行顺序,99 表示最后启动)。

vi /opt/etc/init.d/S99start_apps.sh
在脚本中添加以下内容,假设你的程序路径如下(根据实际情况修改路径):

!/bin/sh

Start qBittorrent-nox

/opt/bin/qbittorrent-nox> /opt/var/log/qbittorrent.log 2>&1 &

Start RustDesk server (hbbs and hbbr)

/op/usr/bin/hbbs > /opt/var/log/hbbs.log 2>&1 &
/opt/usr/bin/hbbr > /opt/var/log/hbbr.log 2>&1 &
上面的脚本会启动以下内容:

qBittorrent-nox,并将日志输出到 /opt/var/log/qbittorrent.log。
hbbs 和 hbbr,并将日志分别输出到 /opt/var/log/hbbs.log 和 /opt/var/log/hbbr.log。
保存并退出编辑器(如果是 vi,按 Esc,然后输入 :wq,回车保存)。

设置脚本可执行权限
chmod +x /opt/etc/init.d/S99start_apps.sh
验证和测试启动脚本
/opt/etc/init.d/S99start_apps.sh
查看日志文件 /opt/var/log/ 中是否有相关的输出,并确保 qBittorrent、hbbs 和 hbbr 都能正常启动。

添加到 Entware Startup
Entware 的启动脚本通常会自动执行 /opt/etc/init.d/ 目录下的脚本。你不需要额外配置任务计划
可以使用 ls 命令检查 init.d 目录下的所有脚本是否存在:
ls /opt/etc/init.d/
重启系统测试
在重启系统后,检查程序是否自动启动。你可以执行以下命令来查看 qBittorrent、hbbs 和 hbbr 是否在运行:

ps aux | grep qbittorrent-nox
ps aux | grep hbbs
ps aux | grep hbbr
如果它们正常启动,则表示配置成功。

删除多余的脚本:rm /opt/etc/init.d/S99start_apps.sh

三、安装transmission并配置
1、opkg list transmission*
opkg install transmission-web
2、创建数据目录(根据需要进行调整,可以设置成自己的):

mkdir /opt/Torrent/
mkdir /opt/Torrent/Incomplete
mkdir /opt/Torrent/Watch
mkdir /opt/Torrent/Completed

3、确保 Transmission 尚未运行,然后编辑其配置:

/opt/etc/init.d/S88transmission stop
nano -t /opt/etc/transmission/settings.json

4、您将需要调整以下路径:

"download-dir": "/opt/Torrent/Completed(改成自己的)",
"watch-dir": "/opt/Torrent/Watch(改成自己的)",
"incomplete-dir": "/opt/Torrent/Incomplete(改成自己的)",
"incomplete-dir-enabled": ture,

5、此外,还建议对 Web UI 进行密码保护。设置以下参数:

"rpc-authentication-required": true,
"rpc-username": "admin",
"rpc-password": "yourpassword",

6、使用 Transmission
现在一切都已配置完毕。您可以立即手动启动它(它将在启动时自动启动):

/opt/etc/init.d/S88transmission start
7、通过以下方式访问

http://:9091/
8、登陆 设置,使用router的 udp 51413
可以了或者,您可以打开设备上的端口以简化对等体之间的连接:

iptables -I INPUT -p tcp --destination-port 51413 -j ACCEPT
iptables -I INPUT -p udp --destination-port 51413 -j ACCEPT
8、不需要配置开机启动,自动的