← Back to Pull requests

fix(library): drop dead enetx/surf so go install works #2508

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Dec 01, 2026 00:57 UTC
Author

Summary

The enetx GitHub org was deleted. github.com/enetx/http3 v1.0.7 is gone from GitHub and proxy.golang.org, so every CLI that required github.com/enetx/surf (77 of them) failed a clean-cache go install ...@latest. That includes the npm installer path. Bumping surf is not an option because newer surf needs Go 1.27, above the 1.26.11 floor.

This PR ports every affected CLI to a uTLS transport modeled on the current generator template (internal/generator/templates/chrome.go.tmpl) and cli-printing-press #5522:

  • Chrome ClientHello via github.com/refraction-networking/utls

  • HTTP/2 first, HTTP/1.1 fallback remembered per host; plain http:// uses a stock transport with env proxy

  • HTTPS_PROXY / HTTP_PROXY CONNECT tunnel, so the Chrome hello reaches the origin through a proxy

  • Chrome default headers added only when the caller did not set them

  • TLS verification on. CLIs with an existing skip-TLS-verify option keep honoring it. Note: surf skipped verification unless SecureTLS() was called, so CLIs that never called it now verify certificates. That is intended.

  • --timeout still bounds the whole request and the wait for response headers
  • What Changed

  • 70 CLIs share one shape: newHTTPClient in internal/client/client.go now calls newChromeHTTPClient, defined in a new internal/client/chrome_transport.go with a chrome_transport_test.go (verification on by default, h2, h1 fallback, caller headers kept). Scripted.

  • Hand-fixed outliers:

  • - allrecipes: was ForceHTTP3; now HTTP/2 with HTTP/1.1 fallback (README/SKILL transport line updated; facebook-marketplace docs had the same stale HTTP/3 line)
    - myfitnesspal: MFP transport and diary client wrap the new transport (exported client.NewChromeHTTPClient)
    - recipe-goat, fpi-india (nsdl), pointhound (flights POST rewritten from surf's request API to net/http): use client.NewChromeHTTPClient
    - table-reservation-goat: new internal/chromehttp package shared by the OpenTable and Tock sources; tock test builds a plain client
    - medium-reader, japan-theme-parks: copy in their own package; existing redirect policies kept
    - navitime: keeps the Firefox identity it was verified with (uTLS HelloFirefox_Auto and Firefox headers)
  • Raised x/net, brotli, compress and a few websocket deps past their reachable advisories (second commit).

  • Dropped every enetx and quic-go requirement, removed the stale "Floor the HTTP/3 transitive deps" go.mod comment, and ran go mod tidy with Go 1.26.11 and GOTOOLCHAIN=local. No go directive changed.

  • Each CLI gets .printing-press-patches/surf-removed-utls-chrome-transport.json. No release ledger, changelog or version edits (post-merge automation owns those).
  • Modules touched (77):

  • ai: midjourney, openart

  • cloud: cloud-run-admin

  • commerce: costco, ebay, etsy-seller-dashboard, facebook-marketplace, harris-teeter, loopnet, offerup, slickdeals, woolworths, woot

  • developer-tools: apple-search-ads, framer, mcpmarket, npm, postman-explore, uspto-tsdr, yeswehack

  • devices: wahoo

  • education: dreaming

  • food-and-dining: allrecipes, dominos, flipp, food52, foodpanda, ifood, jimmy-johns, pagliacci, recipe-goat, table-reservation-goat, texas-roadhouse, wolt

  • health: nejm, suppco

  • marketing: erank, google-trends, listingview, placeit, trustpilot

  • media-and-entertainment: digg, flow, goodreads, medium-reader, mobalytics-lol, printgoat, scryfall, skool, ticketdata, twitch

  • monitoring: sentry

  • other: apartments, fpi-india, gisis, gravitus, greatclips, redfin, surfline

  • payments: nccpl

  • productivity: concur, expensify, ihatepdf-cv, myfitnesspal, raindrop, tiimo

  • project-management: redmine

  • sales-and-crm: gohighlevel

  • travel: airhint, alaska-airlines, booking-com, delta-trip, japan-theme-parks, navitime, peerspace, pointhound, travelclick
  • Validation

  • go mod tidy && go build ./... && go vet ./... && go test ./... in all 77 modules with Go 1.26.11, GOTOOLCHAIN=local. 75 pass. slickdeals (TestMigrate_ConcurrentFreshDB, SQLITE_BUSY) and apartments (TestRetryAfter_Epoch*) fail identically on unmodified main, so they are pre-existing and not touched here.

  • No go.mod or go.sum in the library mentions enetx, quic-go or qpack for the touched modules

  • Clean-cache go install ...@92000ad71841d08630c6c41c05981d1067b589eb (fresh GOPATH and GOMODCACHE) succeeded for digg, allrecipes, table-reservation-goat, navitime, myfitnesspal, pointhound, japan-theme-parks, medium-reader, fpi-india and ebay

  • Live requests: digg-pp-cli top --topic tech and doctor (API and search reachable), allrecipes-pp-cli search lasagna (real results through the former HTTP/3 path), navitime-pp-cli places search Shinjuku --data-source live (Firefox profile)

  • Local CI scripts: supply-chain scan (advisory only), release ledger guard, publish-package, binary payload, press version, attribution, go floor

  • verify_skill for allrecipes and facebook-marketplace

  • govulncheck ./... reports 0 reachable vulnerabilities in all 77 modules. The surf graph had pinned golang.org/x/net, andybalholm/brotli and klauspost/compress (and gorilla/websocket, gobwas/ws, x/text in a few CLIs) below their fixes, and the new transport calls x/net/http2 directly, so a second commit raises them to the first fixed versions (upgrade only, x/net v0.62.0). No go directive changed.
  • Gaps / Follow-Up

  • Several READMEs still describe the transport as "Surf" in prose. Left as is to keep this diff to the fix.
  • 🤖 Generated with Claude Code

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: mvanhorn Review duration: 872m
    All Vouch review confidence checks passed
    Residual risk 0.30 = Change Risk (0.52) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #2508"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 29.7% · Safe to merge
    29.7%