Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Some improvments
Browse files Browse the repository at this point in the history
- add new argument --no-close-pairing

- improve logging and help descriptions

- improve class `List2Attr`, `UTorrentPairing`
  • Loading branch information
SeaHOH committed Aug 11, 2020
1 parent be1eda5 commit 321916c
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 134 deletions.
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ Network File:

```
$ ban_peers -h
Welcome using Ban-Peers 0.6.0
Welcome using Ban-Peers 0.6.1
Usage:
ban_peers [-H IP|DOMAIN] [-p PORT] [-a USERNAME:PASSWORD]
[-e HOURS] [-f FORMAT] [-C] [-X] [-P] [-L] [-R] [-U]
[-A] [-h] [-v] [IPFILTER-PATH]
[-A] [-O] [-h] [-v] [IPFILTER-PATH]
Checking & banning BitTorrent leech peers via Web API, remove ads, working for
uTorrent.
Expand All @@ -87,7 +87,7 @@ Optional Arguments:
-e HOURS, --expire HOURS
Ban expire time for peers, default 12 HOURS
-f FORMAT, --log-header FORMAT
Format of log header, default %H:%M:%S
Format of log header, see time.strftime, default %H:%M:%S
-C, --resolve-country
Set uTorrent to resolved peer's country code at start-up
-X, --no-xunlei-reprieve
Expand All @@ -101,15 +101,20 @@ Optional Arguments:
-U, --log-unknown
Logging unknown clients
-A, --remove-ads
Remove ads via set Advanced Settings, only working for localhost
Remove ads via set Advanced Settings, only working for
localhost, and to fail in older uTorrent
-O, --no-close-pairing
Don't turn off Web Pairing setting after remove ads
-h, --help Show this help message and exit
-v, --version Show version and exit
```

```markdown
$ ban_peers -p 12345 -a username:password /var/lib/utserver
Welcome using Ban-Peers 0.6.0
19:44:35 设定 uTorrent 配置 'gui.show_plus_upsell_nodes' 到 False **_Remove upsell tip in the sidebar_**
Welcome using Ban-Peers 0.6.1
19:44:33 Set uTorrent setting 'webui.allow_pairing' to True
19:44:35 Set uTorrent setting 'gui.show_plus_upsell_nodes' to False **_Remove upsell tip in the sidebar_**
19:44:35 Set uTorrent setting 'webui.allow_pairing' to False **_disallow pairing_**
19:44:35 Set uTorrent setting 'bt.use_rangeblock' to False **_Won't restore after quit_**
19:44:35 uTorrent auto-banning script start running
Choose your operation: (Q)uit, (S)top, (R)estart, (P)ause/Proceed
Expand All @@ -119,12 +124,14 @@ or

```markdown
$ ban-peers
Welcome using Ban-Peers 0.6.0
Welcome using Ban-Peers 0.6.1
Please input uTorrent settings folder path or ipfilter file path:
/var/lib/utserver
Please input WebUI username: username
Please input WebUI password: password **_No cover_**
19:44:35 设定 uTorrent 配置 'gui.show_plus_upsell_nodes' 到 False **_Remove upsell tip in the sidebar_**
19:44:33 Set uTorrent setting 'webui.allow_pairing' to True
19:44:35 Set uTorrent setting 'gui.show_plus_upsell_nodes' to False **_Remove upsell tip in the sidebar_**
19:44:35 Set uTorrent setting 'webui.allow_pairing' to False **_disallow pairing_**
19:44:35 Set uTorrent setting 'bt.use_rangeblock' to False **_Won't restore after quit_**
19:44:35 uTorrent auto-banning script start running
Choose your operation: (Q)uit, (S)top, (R)estart, (P)ause/Proceed
Expand All @@ -144,6 +151,8 @@ Visit the [issues board](https://github.com/SeaHOH/ban-peers/issues) and post th

https://github.com/ShenHongFei/utorrent-block-xunlei
https://github.com/iHamsterball/utorrent_block_thunder
https://github.com/isimonov/disable-uTorrent-ads
https://github.com/SchizoDuckie/PimpMyuTorrent

- qBittorrent

Expand All @@ -156,6 +165,8 @@ Visit the [issues board](https://github.com/SeaHOH/ban-peers/issues) and post th
# Thanks
[c0re100](https://github.com/c0re100/qBittorrent-Enhanced-Edition)
[ShenHongFei](https://github.com/ShenHongFei/utorrent-block-xunlei)
[isimonov](https://github.com/isimonov/disable-uTorrent-ads)
[SchizoDuckie](https://github.com/SchizoDuckie/PimpMyuTorrent)

# License
Ban-Peers is released under the [![license](https://img.shields.io/github/license/SeaHOH/ban-peers)](https://github.com/SeaHOH/ban-peers/blob/master/LICENSE).
23 changes: 17 additions & 6 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ Android:

```
ban_peers -h
欢迎使用 Ban-Peers 0.6.0
欢迎使用 Ban-Peers 0.6.1
用法:
ban_peers [-H IP|域名] [-p 端口] [-a 用户名:密码] [-e 小时]
[-f 格式] [-C] [-X] [-P] [-L] [-R] [-U] [-h] [-v] [-A]
[IP屏蔽配置路径]
[-O] [IP屏蔽配置路径]
通过网页 API 检查并屏蔽 BitTorrent 吸血对端,移除广告,工作于 uTorrent。
Expand All @@ -84,7 +84,7 @@ ban_peers -h
-e 小时, --expire 小时
屏蔽对端的过期时间,默认 12 小时
-f 格式, --log-header 格式
日志头格式,默认 %H:%M:%S
日志头格式,参见 time.strftime,默认 %H:%M:%S
-C, --resolve-country
启动时,设置 uTorrent 解析对端国家代码
-X, --no-xunlei-reprieve
Expand All @@ -98,15 +98,20 @@ ban_peers -h
-U, --log-unknown
将未知客户端记入日志
-A, --remove-ads
通过高级设置移除广告,仅工作于本地主机
通过高级设置移除广告,仅工作于本地主机,也无法工作于较
旧版本的 uTorrent
-O, --no-close-pairing
移除广告后,不关闭网络配对配置项
-h, --help 显示此帮助信息并退出
-v, --version 显示版本信息并退出
```

```markdown
C:\Users\username>ban_peers -p 12345 -a username:password X:\uTorrent
欢迎使用 Ban-Peers 0.6.0
欢迎使用 Ban-Peers 0.6.1
19:44:33 设定 uTorrent 配置 'webui.allow_pairing' 到 True **_允许配对_**
19:44:35 设定 uTorrent 配置 'gui.show_plus_upsell_nodes' 到 False **_移除侧栏付费版升级提示_**
19:44:35 设定 uTorrent 配置 'webui.allow_pairing' 到 False **_禁止配对_**
19:44:35 设定 uTorrent 配置 'bt.use_rangeblock' 到 False **_脚本退出后不会自动恢复_**
19:44:35 uTorrent 自动屏蔽脚本开始运行
请选择你要执行的操作: (Q)退出,(S)停止,(R)重新开始,(P)暂停/恢复
Expand All @@ -116,12 +121,14 @@ C:\Users\username>ban_peers -p 12345 -a username:password X:\uTorrent

```markdown
C:\Users\username>ban_peers
欢迎使用 Ban-Peers 0.6.0
欢迎使用 Ban-Peers 0.6.1
请输入 uTorrent 配置文件夹路径,或者 ipfilter 文件路径:
X:\uTorrent
请输入 WebUI 用户名: username
请输入 WebUI 密码: password **_没有遮掩_**
19:44:33 设定 uTorrent 配置 'webui.allow_pairing' 到 True **_允许配对_**
19:44:35 设定 uTorrent 配置 'gui.show_plus_upsell_nodes' 到 False **_移除侧栏付费版升级提示_**
19:44:35 设定 uTorrent 配置 'webui.allow_pairing' 到 False **_禁止配对_**
19:44:35 设定 uTorrent 配置 'bt.use_rangeblock' 到 False **_脚本退出后不会自动恢复_**
19:44:35 uTorrent 自动屏蔽脚本开始运行
请选择你要执行的操作: (Q)退出,(S)停止,(R)重新开始,(P)暂停/恢复
Expand All @@ -141,6 +148,8 @@ X:\uTorrent

https://github.com/ShenHongFei/utorrent-block-xunlei
https://github.com/iHamsterball/utorrent_block_thunder
https://github.com/isimonov/disable-uTorrent-ads
https://github.com/SchizoDuckie/PimpMyuTorrent

- qBittorrent

Expand All @@ -153,6 +162,8 @@ X:\uTorrent
# 感谢
[c0re100](https://github.com/c0re100/qBittorrent-Enhanced-Edition)
[ShenHongFei](https://github.com/ShenHongFei/utorrent-block-xunlei)
[isimonov](https://github.com/isimonov/disable-uTorrent-ads)
[SchizoDuckie](https://github.com/SchizoDuckie/PimpMyuTorrent)

# License
Ban-Peers 以 [![license](https://img.shields.io/github/license/SeaHOH/ban-peers)](https://github.com/SeaHOH/ban-peers/blob/master/LICENSE) 许可发布。
Loading

0 comments on commit 321916c

Please sign in to comment.