qBittorrent-ClientBlocker,某些不友好的IP和客户端,保护 BT 网络,保护宽带

简介

为了防止被恶意 客户端/IP 吸血,封禁某些不友好的 IP/客户端,保护 BT 网络,保护宽带。

源码:https://github.com/Simple-Tracker/qBittorrent-ClientBlocker

安装

以 Linux 为例:

创建文件夹

1
mkdir -p /opt/qBittorrent-ClientBlocker

解压文件

1
tar -zxvf 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

winodws 快捷方式启动

winodws 每次启动 qBittorrent 和 qbittorrent-clientblocker,有点繁琐,可以新建快捷方式启动,点击之后可以同时启动。

桌面右键 -> 新建快捷方式,“请键入对象的位置”填写为以下指示的内容:(先不要急着 copy)

1
C:\Windows\System32\cmd.exe /c "(tasklist | findstr qBittorrent-ClientBlocker || start D:\download_tool\qBittorrent-ClientBlocker-3.6-windows-amd64\qBittorrent-ClientBlocker.exe --hidewindow) && start D:\download_tool\qBittorrent\qbittorrent.exe"

copy之前需要将其中软件的路径修改为自己机器所在的路径

需要修改的地方:

  • D:\download_tool\qBittorrent-ClientBlocker-3.6-windows-amd64\qBittorrent-ClientBlocker.exe

  • D:\download_tool\qBittorrent\qbittorrent.exe

修改并填入后,点击下一步,填入快捷方式的名称,比如

1
qBittorrent and qBittorrent-ClientBlocker 快捷方式

下一步完成即可。

如果不喜欢默认的图标,可以 鼠标移动到 快捷方式上,右键 -> 属性,找到 更改图标,设置 qBittorrent 所在的图标,比如

1
D:\download_tool\qBittorrent\qbittorrent.exe
网站总访客数:1352
网站总访问量:6974
使用 Hugo 构建
主题 StackJimmy 设计
-->