Repository navigation
Release 0.4.0: keep undici and got on the proxy, and return a native ky Response - #85
Merged
Merged
Conversation
Patch release for the ky 2.2+ native Response fix. package.json, jsr.json, and the lockfile root version stay in sync. Co-authored-by: ProxyMesh AI <proxymeshai@users.noreply.github.com>
Co-authored-by: ProxyMesh AI <proxymeshai@users.noreply.github.com>
0.3.1 is the wrong bump once main includes the undici/got proxy-bypass fix. tlsOptions and connectTimeout are new public undici options, and the got adapter now rejects HTTP URLs and HTTPS-to-HTTP redirects. Co-authored-by: ProxyMesh AI <proxymeshai@users.noreply.github.com>
proxymesh
approved these changes
Nov 2, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Minor release 0.4.0 (
0.3.0→0.4.0). The branch name staysrelease/0.3.1. The GitHub tag is read frompackage.jsonon merge (.github/workflows/release-on-merge.yml), so this publishes asv-0.4.0, notv-0.3.1.0.3.1 is the wrong number. Everything user-facing since tag
v-0.3.0(commitfa48928) is a bug or security fix, but #82 also adds public undici options and changes got behavior that callers have to handle. This package is still pre-1.0, so that is a minor bump.User-facing
Undici and got stay on the configured proxy (#82)
Undici. HTTPS
request()completed CONNECT, then ignored the tunnel and dialed the origin directly.connect: { socket }is a TLS option, not undici’s pre-connected tunnel API. Origin TLS is now wrapped on the CONNECT socket withbuildConnectorandhttpSocket. Bytes that arrive with the CONNECT response are paused and unshifted so they are not dropped before TLS.New optional fields on
request()/UndiciRequestOptions(types/undici.d.ts,docs/undici.md):tlsOptions— TLS options for the origin connection over the CONNECT tunnel.connectTimeout— origin CONNECT/TLS handshake timeout in milliseconds. It is applied as the connectortimeoutbecause undici ignores the clientconnectTimeoutwhenconnectis a function.proxyTlsOptionswas already accepted.Got. Only
agent.httpswas set, sohttp://URLs and HTTPS→HTTP redirects used got’s default HTTP agent and connected directly. The adapter now throwsTypeError: javascript-proxy-headers/got only supports HTTPS; HTTP would bypass the proxyfor those URLs, and pinsagent.httpto the same proxy agent so a missed hook cannot fall back to a direct connect. Callers that passed plain HTTP, or that followed a downgrade redirect, need to stay on HTTPS.ky returns a native Response (#81)
ky 2.2+ throws
The fetch option must resolve with a Responsewhen the custom fetch resolves with a node-fetch response. The adapter now returns a native globalResponsewith the proxyproxyHeadersMap attached.content-encoding, andcontent-lengthare dropped when those headers are copied onto the native Response (node-fetch has already decompressed the body; leavingcontent-encodingwould decode twice).proxyHeadersis an own property and is not copied byresponse.clone().That landed in #81, in the same commit as the ky 2.2.0 devDependency bump. #77’s commit message listed ky 2.2.0, but the lockfile stayed on 2.1.0 until this Response check was supported. #79 is the
ubuntu-24.04CI pin, not this fix.Also on main since v-0.3.0 (not user-facing)
ubuntu-24.04(ci: pin GitHub Actions jobs to ubuntu-24.04 #79).qslockfile bump 6.16.0 → 6.17.1 (chore(deps): Bump qs from 6.16.0 to 6.17.1 #84).Version fields updated together:
package.json,jsr.json, and the root version fields inpackage-lock.json. The repo has noCHANGELOG.md. README / getting-started “0.3.0 breaking changes” notes still describe the 0.3.0 header isolation; #82 added the got HTTPS-only and undici tunnel sentences under that heading and those were left as-is.Merging
release/0.3.1intomainis what creates GitHub releasev-0.4.0and then publishes to npm and JSR. Auto-merge is not enabled. The repo owner's merge is the approval. Nothing is published by this PR.