Skip to content

fix(apps_script): keep Code.gs relay responses wrapped#1265

Merged
therealaleph merged 1 commit into
mainfrom
codex/fix-codegs-json
May 17, 2026
Merged

fix(apps_script): keep Code.gs relay responses wrapped#1265
therealaleph merged 1 commit into
mainfrom
codex/fix-codegs-json

Conversation

@therealaleph
Copy link
Copy Markdown
Owner

Fixes the v1.9.28 Code.gs JSON parse regression reported in #1245, #1253, #1261, and similar reports. The simple Code.gs path was returning the destination body verbatim when req.r was true, so the Rust client tried to parse arbitrary HTML/JSON payloads as the relay envelope. This matches CodeFull.gs by keeping responses wrapped and using req.r only to control redirect following.\n\nTests:\n- node --check /tmp/Code-1265-fix.js\n- cargo test --lib

@github-actions github-actions Bot added the type: fix fix: PR — auto-applied by release-drafter label May 17, 2026
@therealaleph therealaleph merged commit f4257a5 into main May 17, 2026
1 check passed
dazzling-no-more added a commit to dazzling-no-more/rahgozar that referenced this pull request May 18, 2026
`-s ours` merge of upstream/main up to 8c59627. Records upstream
history without applying any of its trees, so `git log
upstream/main..main` returns 0 and the "N commits behind" indicator
falls silent.

Why none of the 11 upstream commits need a fresh tree change:

- 2e2ea4f fix(domain-fronting) guard fallback JSON extraction
  Picked up in 6f365b8 just before this merge — applied manually because
  the surrounding rfind('}') / serde_json::from_str lines had drifted on
  the fork. Same three-site fix, same semantics.

- f4257a5 fix(apps_script) keep Code.gs relay responses wrapped (therealaleph#1265)
  Already effectively applied in our cd78600. Upstream uses `req.r ===
  true` for both raw-return and redirect-control; we split the two
  concepts in v2.0.2 with an additive `raw` flag, leaving `r` to mean
  followRedirects (see Code.gs:296 and :407). Their fix is a regression
  fix in their own design — our design never had the regression.

- 919b13b / 875dd4b / 98e73d7 feat(tunnel) pipelined Full-mode tunnel
  Already in our main as 8480ca5 (cherry-picked into v2.0.2 as the
  headline change). Re-applying would no-op on content and muddy blame.

- e362638 / d56ddc6 / 2e2ea4f / d725785 / d822d67 v1.9.27 exit-node fixes
  Folded into v2.0.2 already: our 0797919 (Deno fetch export), dcb0957
  (Akamai/CF bot-block hints + unity.com), and cd78600 (Apps Script
  double-wrap unwrap via additive `raw` flag) cover the same surface
  with our naming and credit our changelog.

- f5ebb22 release: prepare v1.9.29 (therealaleph#1266) and 8c59627 prebuilt
  refresh — upstream's own version-bump + auto-committed mhrv-rs-named
  binaries. Strictly harmful on the fork: would set Cargo.toml back to
  1.9.29, add upstream's docs/changelog/v1.9.29.md, and dump 17
  mhrv-rs-* artifacts into releases/ alongside the rahgozar-* set.

Repeat this pattern (`git merge -s ours upstream/main`) whenever
upstream advances and we've decided none of the new commits apply
to the rahgozar fork.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix fix: PR — auto-applied by release-drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant