Skip to content

[superseded by #5774] fix(management): use Chrome TLS for ChatGPT api-call - #5769

Closed
HuiCheng wants to merge 1 commit into
router-for-me:devfrom
HuiCheng:fix/management-apicall-chatgpt-chrome-tls
Closed

HuiCheng wants to merge 1 commit into
router-for-me:devfrom
HuiCheng:fix/management-apicall-chatgpt-chrome-tls

Conversation

@HuiCheng

@HuiCheng HuiCheng commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Superseded by #5774

This PR was closed after a bad force-push stuck the head on a root commit (false-positive AGENTS.md guard; GitHub then refused reopen). Continue review on #5774 (same branch tip restored: 6 files on dev / v7.2.159, no AGENTS.md).


Summary (historical)

Management POST /v0/management/api-call to https://chatgpt.com/backend-api/subscriptions returned Cloudflare 403 HTML (“Enable JavaScript”) instead of subscription JSON. Panels such as CPA-Manager-Plus need this for plan metadata (active_until, plan_type, billing). Related: seakee/CPA-Manager-Plus#743.

Route https://chatgpt.com through the shared fingerprint / Chrome uTLS path. Other hosts keep the stdlib transport. Proxy priority and $TOKEN$ substitution are unchanged; ChatGPT-web headers are filled only when missing.

Test plan

See #5774.

@github-actions
github-actions Bot changed the base branch from main to dev September 12, 2026 14:53
@github-actions

Copy link
Copy Markdown

This pull request targeted main.

The base branch has been automatically changed to dev.

@HuiCheng
HuiCheng force-pushed the fix/management-apicall-chatgpt-chrome-tls branch from 7e8eda9 to 15e2e88 Compare September 12, 2026 14:56
@HuiCheng HuiCheng changed the title fix(management): Chrome TLS for ChatGPT api-call subscriptions fix(management): use Chrome TLS for ChatGPT api-call Sep 12, 2026
@HuiCheng

Copy link
Copy Markdown
Contributor Author

Follow-up for codebase evolution: management APICall no longer keeps a private chatgpt.com chrome RoundTripper.

  • Host gate moved to helps.IsChatGPTUpstreamURL (same strictness pattern as IsAnthropicUpstreamURL)
  • Transport routing goes through helps.NewFingerprintRoundTripper, shared with Codex/Claude's utls client path
  • When fingerprint/host rules evolve in helps/, api-call picks them up automatically

ChatGPT web header defaults for omitted caller headers remain in management (subscriptions-oriented), gated by the shared URL helper.

Route ChatGPT/Anthropic hosts through helps.NewFingerprintRoundTripper
and IsChatGPTUpstreamURL so management APICall tracks the same host
gate and ClientHello evolution as Codex/Claude, instead of a private
chrome-only copy that can drift over time.
@HuiCheng HuiCheng closed this Sep 12, 2026
@HuiCheng
HuiCheng force-pushed the fix/management-apicall-chatgpt-chrome-tls branch from 530bc36 to 7db6a76 Compare September 12, 2026 23:18
@github-actions

Copy link
Copy Markdown

This repository does not allow modifying AGENTS.md in pull requests.

Detected changes:

  • AGENTS.md

Please revert these changes and open a new PR without touching AGENTS.md.

@HuiCheng

Copy link
Copy Markdown
Contributor Author

False alarm from a bad force-push that accidentally rewrote the branch tip as a root commit (entire tree looked like new files, including AGENTS.md).

Restored the original two-commit stack on top of v7.2.159 / dev; tip no longer touches AGENTS.md. Sorry for the noise.

@HuiCheng

Copy link
Copy Markdown
Contributor Author

Superseded: bad force-push stuck this PR's head on a root commit (triggered the AGENTS.md guard as a false positive), and GitHub refused reopen after close.

Replacement: #5774

Branch tip is restored (6 files, no AGENTS.md).

@HuiCheng HuiCheng changed the title fix(management): use Chrome TLS for ChatGPT api-call [superseded by #5774] fix(management): use Chrome TLS for ChatGPT api-call Sep 12, 2026
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