Skip to content

feat: Enhance proxy clearance management with support for clearance origins and host handling#496

Merged
chenyme merged 1 commit into
mainfrom
enhance_nsfw
Apr 21, 2026
Merged

feat: Enhance proxy clearance management with support for clearance origins and host handling#496
chenyme merged 1 commit into
mainfrom
enhance_nsfw

Conversation

@chenyme

@chenyme chenyme commented Apr 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • 调整 NSFW 开启流程,改为按实际上游要求执行 accept_tos -> set_birth_date -> enable_nsfw,在开启前自动接受 accounts.x.ai 的条款。
  • 修正 FlareSolverr clearance 逻辑,按 proxy + host 维度缓存和刷新,不再把 accounts.x.aigrok.com 共用同一份 clearance。
  • 精简 proxy clearance 实现:去掉把 host 编进字符串 key 再拆解的过渡逻辑,改为显式 clearance_host 字段和 tuple key,失效反馈也只作用于对应 host。
  • 收敛重复定义,xai_auth 改为复用统一的 endpoint table,并清理了一些无用辅助逻辑。
  • 补充文档说明:FlareSolverr 模式下,NSFW 相关流程需要分别获取 accounts.x.aigrok.com 的 clearance。

Testing

  • uv run ruff check app/control/proxy/models.py app/control/proxy/providers/manual.py app/control/proxy/providers/flaresolverr.py app/control/proxy/__init__.py app/dataplane/proxy/__init__.py app/dataplane/proxy/table.py app/dataplane/reverse/protocol/xai_auth.py app/products/web/admin/batch.py
  • uv run python -m compileall app
  • FlareSolverr 未做真实上游联调;本次验证为静态检查和编译检查,未实际执行带真实 token / FlareSolverr 的 POST /batch/nsfw 请求。

Related

@chenyme chenyme merged commit 717d2fc into main Apr 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant