Simple-Tracker / qBittorrent-ClientBlocker

一款适用于 qBittorrent/Transmission (Beta)/BitComet (Beta, Partial) 的客户端屏蔽器, 默认屏蔽包括但不限于迅雷等客户端. A client blocker compatible with qBittorrent/Transmission (Beta)/BitComet (Beta, Partial) which is prohibited to include but not limited to clients such as Xunlei.
MIT License
934 stars 24 forks source link

从配置文件中正确读取主机名,或者提供选项禁用读取配置文件 #16

Closed UjuiUjuMandan closed 7 months ago

UjuiUjuMandan commented 7 months ago

当在 qBittorrent 中使用 HTTPS 时,blocker 无法正确读取证书途径中的主机名,而是读到了 127.0.0.1 ,这导致证书验证错误, blocker 无法连接。

qBittorrent的配置文件部分内容:

WebUI\Address=*
WebUI\AlternativeUIEnabled=false
WebUI\AuthSubnetWhitelist=127.0.0.1/32, 192.168.1.0/24, ::1/128
WebUI\AuthSubnetWhitelistEnabled=true
WebUI\BanDuration=3600
WebUI\CSRFProtection=true
WebUI\ClickjackingProtection=true
WebUI\CustomHTTPHeaders=
WebUI\CustomHTTPHeadersEnabled=false
WebUI\Enabled=true
WebUI\HTTPS\CertificatePath=/Users/[redacted]/.acme.sh/[redacted].duckdns.org_ecc/fullchain.cer
WebUI\HTTPS\Enabled=true
WebUI\HTTPS\KeyPath=/Users/[redacted]/.acme.sh/[redacted].duckdns.org_ecc/[redacted].duckdns.org.key
Screenshot 2024-02-10 at 03 29 12 Screenshot 2024-02-10 at 03 28 58
UjuiUjuMandan commented 7 months ago

经测试,blocker 自身配置文件中有指定登录相关数值时,则不会读取 qBittorrent 配置文件。 刚才我的配置文件出现 JSON 格式错误,才造成这个问题。