Repository navigation
Releases
v3.61.0 Release
New Features
- Add
Client.SetResolverandClient.SetHostsfor custom DNS on HTTP/1 and HTTP/2 — customnet.Resolveror static hosts-file-style hostname→IP mapping, with fail-closed behavior for unknown hosts. Closes #169. PR #516 by @ManuelReschke. - Expose
RetryOptionfor middleware read access — addsRequest.GetRetryOption()so middleware can read the live retry config (MaxRetries, interval, conditions, hooks). Closes #475. PR #515 by @ManuelReschke.
Dependencies
- github.com/klauspost/compress v1.19.1 → v1.19.2
- golang.org/x/text v0.40.0 → v0.41.0
- golang.org/x/crypto v0.54.0 → v0.55.0
v3.60.0 Release
Breaking Changes
SetTLSFingerprintSpecAPI change — The signature changed fromSetTLSFingerprintSpec(spec *utls.ClientHelloSpec)toSetTLSFingerprintSpec(fn func() utls.ClientHelloSpec). This fixes a bug where reusing the same spec across multiple TLS handshakes caused the second handshake to fail (#504). The factory function ensures a fresh spec is generated per connection. PR #507 by @1992w.
New Features
-
SetMaxResponseSize— Limit response body size at the client or request level. When Content-Length is known and exceeds the limit, the body is closed without reading. For chunked responses, a streaming limit reader stops at the configured size and returnsErrResponseBodyTooLarge. Closes #406. PR #512 by @ManuelReschke. -
SOCKS4 and SOCKS4a proxy support —
socks4://andsocks4a://proxy URLs are now supported. SOCKS4 resolves domain names locally to IPv4; SOCKS4a sends the domain name to the proxy for remote resolution. Closes #473. PR #510 by @ManuelReschke. -
HTTP QUERY method — Added
Request.Query(url)andRequest.MustQuery(url)for the HTTP QUERY method defined in RFC 10008 (Proposed Standard, June 2026). PR #508 by @thatwasyahya. -
Retry on before-request errors — Retry logic now covers errors from before-request middleware, not just transport errors. PR #499 by @bao-io.
Bug Fixes
- Stream multipart uploads without buffering files — Multipart uploads now stream directly to the HTTP transport via
io.Pipeinstead of building the complete body in abytes.Buffer. Memory usage is bounded for large file uploads. Fixes #433. PR #505 by @ManuelReschke.
Dependencies
- quic-go v0.60.0 → v0.61.0
- klauspost/compress v1.18.2 → v1.19.1
- icholy/digest v1.1.0 → v1.2.0
- google/go-querystring v1.1.0 → v1.2.0
- andybalholm/brotli v1.2.0 → v1.2.2
- golang.org/x/net v0.55.0 → v0.57.0
- golang.org/x/text v0.37.0 → v0.40.0
- golang.org/x/crypto v0.51.0 → v0.54.0 (indirect)
- golang.org/x/sys v0.45.0 → v0.47.0 (indirect)
v3.59.0 Release
Breaking Changes
- Go 1.25+ required — quic-go v0.60.0 drops Go 1.24 support. The
godirective ingo.modis now1.25.0, and CI tests against Go 1.25.x and 1.26.x. Users on Go 1.24 should stay on v3.58.0.
Dependencies
- Port quic-go v0.60.0 — full sync of all http3 changes from quic-go v0.59.0 → v0.60.0 into req's vendored
internal/http3/:- Fix
QuaterStreamID→QuarterStreamIDfield rename in qlogDatagramCreated/DatagramParsed(compile error with quic-go v0.60.0). Fixes #500. - Extract
validateHeaderFieldNameAndValue,validateRegularHeaderField,validateTrailerHeaderFieldhelper functions inheaders.go parseTrailers: addsizeLimitparameter with per-field size accounting anderrHeaderTooLargecheck- Add
validExtendedConnectProtocolfunction (RFC 9220) and validate extended CONNECT:protocolinrequest_writer.go - Use
strings.SplitSeqinextractAnnouncedTrailers
- Fix
v3.58.0 Release
New Features
- Add
SetTLSFingerprintSpecfor custom ClientHelloSpec support — accepts a*utls.ClientHelloSpecfor fine-grained TLS fingerprint customization (JA3/JA4). Closes #477, #478. - Add
SensitiveHeadersRedirectPolicy— strips custom auth headers (e.g.X-API-Key,X-Auth-Token) on cross-domain redirects to prevent credential leakage (CWE-200). Fixes #489. - Port quic-go v0.59.0 — aligns with quic-go v0.59.0 breaking changes: removes deprecated
ConnectionTracingID/ConnectionTracingKey, removes stream hijacking API, replaceshandleUnidirectionalStreamswith per-stream callback, addsRawClientConnfor fine-grained stream control, addsHandleBidirectionalStream(closes conn per RFC 9114), fixesSupportsDatagrams→SupportsDatagrams.Remote. Fixes #482.
Bug Fixes
Unmarshalreturns error on error status codes — now checksIsErrorState()before deserializing, preventing 4xx/5xx response bodies from being deserialized into target structs. Closes #465.- Retry on GOAWAY errors with cached HTTP/2 connections —
RoundTripOnlyCachedConnnow falls through to create a new connection instead of returningerrClientConnGotGoAwaydirectly. Closes #491. SetCookieJarFactoryreturnshttp.CookieJarinterface — changes return type from*cookiejar.Jartohttp.CookieJar, allowing custom cookie jar implementations. Closes #415.- Add
application/jsonto Chrome impersonate accept header — matches Chrome's actual accept header for API requests expecting JSON. Closes #471.
Dependencies
- Upgrade utls to v1.8.2 — security update from v1.8.1. Addresses #459.
Tests
- Add comprehensive unit tests for HTTP/3 frames, headers, transport, and dump.
- Add automated test gate infrastructure.
v3.57.0 Release
- Update go modules.
- Port quic-go v0.57.1 (fix #474)
v3.56.0 Release
- Update go modules
- Port quic-go v0.56.0
v3.55.0 Release
v3.54.2 Release
- Replace go-multierror with errors.Join (#458)
v3.54.1 Release
- Fix data race condition in the Alt-Svc cache(#456)