Skip to content

Append the mainland zone to a proxy username that names no zone - #103

Merged
Digidai merged 1 commit into
mainfrom
mainland-zone-append
Nov 21, 2026
Merged

Digidai merged 1 commit into
mainfrom
mainland-zone-append

Conversation

@Digidai

@Digidai Digidai commented Nov 21, 2026

Copy link
Copy Markdown
Owner

What changes

With PROXY_MAINLAND_ZONE set, a general proxy whose username names no exit zone now gets _custom_zone_<zone> appended for mainland China hosts. A username that already names a zone still has it switched.

Why

#102 only switched an existing zone. After it deployed, four mainland hosts that time out were requested and none was retried: provider_attempts_daily has no proxy_pool_mainland row and each request ended after the 10-second direct timeout. So production's proxy username names no zone.

Still a trial

Whether the proxy account accepts this username and has exits in mainland China is checked after deploy, from the proxy_pool_mainland row. A rejected username fails within a second or two, so a failed trial adds little wait. If it fails, PROXY_MAINLAND_ZONE comes out of wrangler.toml.

Verification

  • npx vitest run: 951 tests pass. Typecheck passes for the Worker and web/.
  • "switches the general proxy to the mainland zone when no mainland proxy is named" fails when the zone is not appended.

The first trial switched an existing zone only, and production's proxy
username names none, so no mainland retry ran. Such a username now gets
_custom_zone_<zone> appended.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T12:43:21.720056Z a0fc8ac PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
website2markdown a0fc8ac Nov 21 2026, 12:43 PM

@Digidai
Digidai merged commit 45d3965 into main Nov 21, 2026
2 checks passed
@Digidai
Digidai deleted the mainland-zone-append branch November 21, 2026 12:44
Digidai added a commit that referenced this pull request Nov 21, 2026
* Revert "Append the mainland zone to a proxy username that names no zone (#103)"

This reverts commit 45d3965.

* Revert "Reach mainland China hosts through the general proxy's mainland zone (#102)"

This reverts commit d01caa9.
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