You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
src/provider/qoder/client.py:新增realm_config_for/openapi_host单一 helper(凭证 realm 或 domain 优先,缺失/异常回退self.host并记 warning),额度/api/v2/quota/usage、签到 campaigns/claim/status(含 legacy)、userinfo、deviceToken/refresh全部改走它;build_openapi_headers也按 domain 推断区域。src/provider/qoder/auth.py:QoderOAuth.start(realm=...)支持按粘贴凭证的realm/domain覆盖区域(resolve_realm:区域名 → 直取,域名 →detect_realm_from_domain,空 → 实例默认),实际使用的 openapi/website 记进 reservation,poll/userinfo 照 reservation 打;同时补齐force_login形参。src/api/admin_auth.py:/api/auth/upstream/start透传realm/domain(仅当渠道 start 认该形参)。src/main.py:仅更新注释(flows["qoder"] 默认区域仍由配置 host 推导,但可被 start 参数覆盖)。影响面
intl 凭证的业务端点主机由 realm 决定;cn / 未声明区域的凭证行为不变(仍是
self.host)。不改配置与白名单,不动调度/计费/DB/前端。验证
新增单测:intl 凭证的额度/签到/claim/status/userinfo/refresh 出站主机全为
openapi.qoder.sh;cn 与未声明区域仍为client.host;realm 配置抛异常或缺少 openapi 时回退 + warning;start(realm="intl")在 cn 配置下登录打国际版主机,实例注入主机只覆盖默认区域。真机验证(intl 凭证实调额度与签到、日志出站主机为 openapi.qoder.sh)需部署环境执行,本 PR 未含该记录。