
Security News
Google’s OSV Fix Just Added 500+ New Advisories — All Thanks to One Small Policy Change
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
utorrent-block-xunlei
Advanced tools
支持 IP 定位,可根据地理位置屏蔽 peers
批量可编程式修改 uTorrent 的 resume.dat 内保存的任务信息,从而:
命令行监控,实时查看 peers 情况
反吸血屏蔽策略,下载时对有上传流量的 peers 放宽处理,如下
this.should_block = this.torrent.state[0] === '做种' ?
/-XL0012-|Xunlei|^7\.|aria2|Xfplay|dandanplay|FDM|go\.torrent|Mozilla/i.test(this.client) && this.upload_speed > 10 * 2 ** 10
: this.torrent.state[0] === '下载' ?
/-XL0012-|Xunlei|^7\.|aria2|Xfplay|dandanplay|FDM|go\.torrent|Mozilla/i.test(this.client) && this.uploaded > this.downloaded * 10 + 5 * 2**20
:
false
-XL0012-***
Xunlei/***
7.x.x.x
Xfplay
FDM
dandanplay
Mozilla
go.torrent
--username
和 --password
参数的值--port
参数的值C:/Users/<用户名>/AppData/Roaming/uTorrent/ipfilter.dat
,该目录下应该有 resume.dat 文件存在)保证 ipfilter.dat 文件存在(若不存在则新建空白 ipfilter.dat 文件),脚本会在原有 ipfilter.dat 文件内容之后添加被屏蔽的 IP,不影响已有内容及其功能utorrent-block-xunlei.exe
, 下载地址: https://github.com/ShenHongFei/utorrent-block-xunlei/releasesutorrent-block-xunlei.exe --help
Usage: utorrent-block-xunlei --port 50050 --username tom --password 123456 --ipfilter "C:/Users/tom/AppData/Roaming/uTorrent/ipfilter.dat"
Xunlei Blocker of uTorrent
Options:
-V, --version output the version number
--hostname <hostname> 可选参数, uTorrent WebUI 主机的 hostname, 默认为本机 127.0.0.1, 也可设置远程主机 IP 或域名 (default: "127.0.0.1")
--port <port> 必传参数, "uTorrent 设置 > 连接 > 监听端口 > 传入连接所使用的端口" 中设置的端口号
--username <username> 必传参数, "uTorrent 设置 > 高级 > 网页界面 > 身份验证 > 用户" 中设置的用户名
--password <password> 必传参数, "uTorrent 设置 > 高级 > 网页界面 > 身份验证 > 密码" 中设置的密码
--ipfilter <ipfilter> 必传参数, uTorrent 数据目录中 ipfilter.dat 文件的完整路径,如: C:/Users/tom/AppData/Roaming/uTorrent/ipfilter.dat
--interval <interval> 可选参数, 检测 peers 的间隔(秒), 默认每隔 20 秒检测并屏蔽一次 (default: "20")
--interval-reset <interval> 可选参数, 间隔 interval 秒自动重置当前时间间隔内被动态屏蔽的 IP,默认间隔 2 小时 (default: "7200")
-h, --help display help for command
启动 blocker (修改下参数的值): utorrent-block-xunlei --port 50050 --username shf --password 123456 --ipfilter "C:/Users/shf/AppData/Roaming/uTorrent/ipfilter.dat"
(可选,不影响屏蔽功能) 在 uTorrent 中开启屏蔽日志,查看被屏蔽的连接请求
4.1 在 uTorrent 下方的日志面板中点击右键
4.2 勾选 记录用户通讯信息 > 记录拦截连接
4.3 有被屏蔽的用户连接时可以在 uTorrent 日志面板中看到类似下面的日志
[2018-11-22 19:03:43] Loaded ipfilter.dat (51 entries)
[2018-11-22 19:03:46] IpFilter blocked peer 223.81.192.235
[2018-11-22 19:03:49] IpFilter blocked peer 223.81.192.235
[2018-11-22 19:04:06] IpFilter blocked peer 223.81.192.235
[2018-11-22 19:04:21] IpFilter blocked peer 183.25.54.216
[2018-11-22 19:04:46] IpFilter blocked peer 223.81.192.235
...
实时控制,查看状态,REPL
在 utorrent-block-xunlei
命令行窗口中输入 utorrent
可通过 REPL 查看其属性,调用其方法
如输入 utorrent.reset_ipfilter()
可清空屏蔽列表和 ipfilter.dat, utorrent.print_blockeds()
可查看被屏蔽的 IP
退出 utorrent-block-xunlei 时需在命令行窗口中输入 exit()
, 以保证 ipfilter.dat
恢复到运行前的状态,不残留动态屏蔽的 IP
npm i utorrent-block-xunlei
import { UTorrent, Torrent, Peer, TorrentData, TorrentFile, ResumeData } from 'utorrent-block-xunlei'
let utorrent = await UTorrent.connect({
root_url: 'http://127.0.0.1:50050/gui/',
username: 'xxx',
password: 'xxxxxxxx',
ipfilter_dat: 'C:/Users/xxx/AppData/Roaming/uTorrent/ipfilter.dat',
interval: 20 * 1000,
print: {
torrents: '所有',
peers: true
}
})
utorrent.start_blocking()
utorrent.hide_display()
utorrent.show_display()
utorrent.stop_blocking()
utorrent.reset_ipfilter()
utorrent.block_peers()
utorrent.print_blockeds()
utorrent.state
FAQs
Xunlei Blocker of uTorrent
The npm package utorrent-block-xunlei receives a total of 0 weekly downloads. As such, utorrent-block-xunlei popularity was classified as not popular.
We found that utorrent-block-xunlei demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
Research
/Security News
175 malicious npm packages (26k+ downloads) used unpkg CDN to host redirect scripts for a credential-phishing campaign targeting 135+ organizations worldwide.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.