简介
封禁某些不友好的 IP/客户端,保护 BT 网络,保护宽带
安装
下载地址:https://github.com/Simple-Tracker/qBittorrent-ClientBlocker/releases
armv7:https://github.com/Simple-Tracker/qBittorrent-ClientBlocker/releases/download/3.6/qBittorrent-ClientBlocker-3.6-linux-armv7.tar.gz
创建文件夹
1
|
mkdir -p /opt/qBittorrent-ClientBlocker
|
解压文件
1
|
tar -zxcvf qBittorrent-ClientBlocker-3.6-linux-armv7.tar.gz -C /opt/qBittorrent-ClientBlocker
|
修改 config.json
1
2
|
cd /opt/qBittorrent-ClientBlocker
vim config.json
|
将 "clientURL": "",
修改为自己的 qbittorrent 所在 ip端口,比如
1
|
"clientURL": "http://localhost:8020",
|
启动
1
|
./qBittorrent-ClientBlocker
|
系统服务
1
|
vim /etc/systemd/system/qbittorrent-clientblocker.service
|
填入以下内容
1
2
3
4
5
6
7
8
9
10
11
12
|
[Unit]
Description=qBittorrent-ClientBlocker service
Wants=network-online.target
After=qbittorrent-nox.service
[Service]
Type=simple
Restart=always
ExecStart=/bin/sh -c "cd /opt/qBittorrent-ClientBlocker && /opt/qBittorrent-ClientBlocker/qBittorrent-ClientBlocker --nochdir"
[Install]
WantedBy=default.target
|
启动服务
1
|
systemctl start qbittorrent-clientblocker.service
|
查看服务
1
|
systemctl status qbittorrent-clientblocker.service
|
关闭服务
1
|
systemctl stop qbittorrent-clientblocker.service
|
开机自启
1
|
systemctl enable qbittorrent-clientblocker.service
|