μTorrent Thunder Auto-block Script
Briefing
Check μTorrent connected peers periodically, and add IPs whose client matches Thunder etc. to IPFilter.
Blocked client list
Unconditionally block
- -XL0012-***
- Xunlei/***
- 7.x.x.x
- QQDownload
- Xfplay
- dandanplay
Conditionally block
Block if peer downloaded more than torrent size
- FDM
- Mozilla
- go.torrent
Others
Block if peer downloaded more than twice times torrent size
Exception
It won't be blocked no matter what the client is if a peer has uploaded any amount of data
Mechanisim
Replica of manual operation basically
- Fetch complete peers list by sending HTTP request according to WebUI API of μTorrent
- Filter IPs that using Thunder, and write to ipfilter.dat file
- Reload IPFilter by sending HTTP request
Configuration
- Modify
protocal
,domain
,port
,path
,user
,password
fields according your own configuration of WebUI. - Currently
ipfilter_path
could automatically fetch default installation path on Windows. If μTorrent is not installed at default path, or you are using Linux / MacOS, please modify the field to absolute path. - Modify
interval
field on your need, default 30 seconds, interger in seconds.
protocal = 'http'
domain = 'localhost'
port = 43202
path = '/gui'
user = 'root'
password = 'toor'
ipfilter_path = os.path.join(os.getenv('appdata'), 'uTorrent', 'ipfilter.dat')
interval = 30
Usage
Presequence: Install and enable μTorrent WebUI
Run directly
python main.py
Run as Windows Service
WIP