alireza0:s-ui 保留订阅凭据设计,建议使用不可猜测的客户端名
在 s-ui #1302 中,alireza0 决定维持现有设计:客户端名默认是随机 8 字符,改用专门令牌会更换现有订阅链接,并影响按名称构造链接的第三方工具。他不采用失败查询的单 IP 限流,理由是 CGNAT、CDN 或反向代理下可能连带封锁正常用户,而多地址攻击者仍可绕过。他建议有此需求的部署保留生成的客户端名或其他不可猜测名称,并设置自定义 subPath 与 subDomain。
作者原文@alireza0Thanks for the write-up.
I'm going to leave the design as it is!
Client names are random 8-character strings by default, so a subscription is only guessable when an operator renames a client to something human. A dedicated token would change every existing user's link and break third-party tools that build sub URLs from the name.I also looked at a per-IP limiter on failed lookups, and it costs more than it saves here. Many users sit behind carrier-grade NAT, where disabled or expired clients that keep polling would lock out working users on the same IP. Subscriptions served through a CDN or reverse proxy would lock out everyone behind the edge IP. And an attacker with many addresses isn't slowed down anyway.
For deployments where this matters: keep the generated client names (or use other unguessable ones), and set a custom
subPathandsubDomain.