Skip to content

Commit

Permalink
Update client blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
c0re100 committed Mar 26, 2024
1 parent 838eac3 commit 8a23c0d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/base/bittorrent/peer_blacklist.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,17 @@
// bad peer filter
bool is_bad_peer(const lt::peer_info& info)
{
std::regex id_filter("-(XL|SD|XF|QD|BN|DL|TS)(\\d+)-");
std::regex id_filter("-(XL|SD|XF|QD|BN|DL|TS|DT)(\\d+)-");
std::regex ua_filter(R"((\d+.\d+.\d+.\d+|cacao_torrent))");
std::regex consume_filter(R"((dt/torrent|Taipei-torrent))");

// TODO: trafficConsume by thank243(senis) but it's hard to determine GT0003 is legitimate client or not...
// Anyway, block dt/torrent and Taipei-torrent with specific case first.
QString country = Net::GeoIPManager::instance()->lookup(QHostAddress(info.ip.data()));
if (country == QLatin1String("CN") && std::regex_match(info.client, consume_filter)) {
return true;
}

return std::regex_match(info.pid.data(), info.pid.data() + 8, id_filter) || std::regex_match(info.client, ua_filter);
}

Expand Down

8 comments on commit 8a23c0d

@Durees
Copy link

@Durees Durees commented on 8a23c0d Mar 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job!

@hkyear
Copy link

@hkyear hkyear commented on 8a23c0d Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个b换了几个客户端标识了,我记得几个月前是个an开头的标识,那时候我都是每隔一会就登陆webui拉黑吸血的ip,建议以后在ui里加上可以自定义拉黑ip段和id的功能,免得以后变了id不能及时拉黑

@slowlearnerLspeedup
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

希望BT客户端可以检测每个传输对象的上传量,达到文件大小时自动暂停对该资源该客户端的传输

@SugerSalt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对于Taipei-torrent,我这边遇到的是Taipei-Torrent,第二个T为大写

@Tang-pure
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

希望作者可以引入类似于"qbittorrent clientblocker"和"peerbandhelper"这样的自动检测封禁功能

@nulllee
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对于Taipei-torrent,我这边遇到的是Taipei-Torrent,第二个T为大写

我也碰上这个了,客户端是Taipei开头的,我不知道qbit的黑名单文件在哪儿放着(刚刚拉黑的,是个惯犯了,原来我就注意过这个ip和客户端),就不太确定具体细节了,上一次从我这儿的一个种子下走了30还是300多个G,然而进度永远是0。ip是58.241.210.(7、8、9、10)(我记得没错的话)。

@nulllee
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对于Taipei-torrent,我这边遇到的是Taipei-Torrent,第二个T为大写

据其他人反馈还有这个形式的——“taipei-torrent dev”。

@eebssk1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

希望BT客户端可以检测每个传输对象的上传量,达到文件大小时自动暂停对该资源该客户端的传输

高级设置里改成根据上传速度+轮流上传/反吸血

Please sign in to comment.