Repository navigation
Releases
v1.26.2 — Go 1.26.5 + utls v1.8.2
Upstream Go: go1.26.5
utls: v1.8.2
go.mod directive: go 1.26.0
Supported Go versions: 1.26.0 – 1.26.5
⚠️ go get @latestresolves to v1.27.0, not this release. A mis-numberedv1.27.0tag (upstream is still go1.26.x) already exists and outranksv1.26.2in semver, so the module proxy serves it as@latest. v1.26.2 is the recommended build — it is a strict superset of v1.27.0. To use it, pin explicitly:go get github.com/dteh/dhttp@v1.26.2
Changes since v1.26.1
- Upgrade to go1.26.5. Upstream's
net/httpsource is byte-identical between go1.26.3 and go1.26.5 (this release's changes were confined tointernal/goroot, an atomic assembly file, and GC scan), so the module source is unchanged apart from the fix below. - Fix a broken
go build -race ./.... Two//go:linknamedirectives in the vendoredinternal/racepackage (ReadObjectPC,WriteObjectPC) referred to function declarations that were already commented out in the fork, which the compiler rejects. The orphaned directives are now commented out too. This bug predated the upgrade.
Also included (debuted in v1.27.0)
- Configurable HTTP/2 client fingerprint via
Transport.HTTP2Settings— control the ordered SETTINGS list and the initial connection-level WINDOW_UPDATE (the "Akamai" H2 fingerprint) to match a specific browser, e.g. Chrome:Together with&http.HTTP2Settings{ Settings: []http.HTTP2Setting{{1, 65536}, {2, 0}, {4, 6291456}, {6, 262144}}, ConnectionFlow: 15663105, }
ClientHelloSettings(JA3/JA4) andPHeaderOrderKey(pseudo-header order), this covers the fields Cloudflare/Akamai fingerprint on. When nil, Go's default settings are sent (unchanged behavior). - Patch-regeneration fix: the v1.27.0 HTTP2Settings feature had been committed by editing the generated files directly without updating
patches/0001-dhttp-combined.patch, so ascripts/build.shrun would have silently reverted it. The change is now folded into the combined patch, and the tree reproduces byte-for-byte.
Fingerprint
utls is unchanged at v1.8.2, so the JA3/Peetprint fingerprint is identical to v1.26.1 / v1.27.0.
v1.27.0 — superseded by v1.26.2
⚠️ Superseded by v1.26.2. Use that instead.This tag was mis-numbered: dhttp's version scheme mirrors the upstream Go minor (
v1.<go-minor>.<patch>), and upstream here is still go1.26.x, so this should have been av1.26.xrelease. It is retained only because the Go module proxy serves published tags immutably.v1.26.2 is a strict superset of this release — it contains the same
Transport.HTTP2SettingsHTTP/2 fingerprint feature, plus the go1.26.5 upgrade, ago build -racefix, and a fix for the patch-regeneration pipeline (this tag's feature had been committed to the generated files without updating the patch, so a rebuild would have reverted it).Because
v1.27.0outranksv1.26.2in semver,go get @latestwill still resolve here. Pin the recommended build explicitly:go get github.com/dteh/dhttp@v1.26.2
Original: configurable HTTP/2 client fingerprint
Adds Transport.HTTP2Settings so callers can control the HTTP/2 ("Akamai") fingerprint the client emits on a new connection — the ordered SETTINGS list and the initial connection-level WINDOW_UPDATE — to match a specific browser. Previously only the TLS ClientHello (ClientHelloSettings) and header order were tunable, so a uTLS-parroted client still sent Go's default H2 SETTINGS.
&http.HTTP2Settings{
Settings: []http.HTTP2Setting{{1, 65536}, {2, 0}, {4, 6291456}, {6, 262144}},
ConnectionFlow: 15663105,
}When nil, Go's defaults are sent (unchanged behavior).
Upstream Go: go1.26.3 · utls: v1.8.2
v1.26.1 — Go 1.26.3 + utls v1.8.2 (adds racing subpackage)
Upstream Go: go1.26.3
utls: v1.8.2
go.mod directive: go 1.26.0
Supported Go versions: 1.26.0 – 1.26.3
New: racing subpackage
HTTP/2 single-packet attack and HTTP/1.1 last-byte sync primitives for race-condition testing during authorized security work. Modelled on PortSwigger's "engine + gate" pattern.
import "github.com/dteh/dhttp/racing"
eng, _ := racing.NewEngine("https://target.example.com")
defer eng.Close()
g := eng.NewGate()
for i := 0; i < 30; i++ {
req, _ := http.NewRequest("POST", url, body)
g.Add(req)
}
resps, err := g.Send(ctx)racing.Engine+Gate— HTTP/2 single-packet. One TLS+h2 connection, N streams, tail frames coalesced into one TCP segment. Server-side skew typically <100µs. Preferred for h2-capable targets.racing.H1Engine+H1Gate— HTTP/1.1 last-byte sync. N parallel TCP+TLS connections, simultaneous barrier-fire of final bytes. Server-side skew ~ms. Use against h1-only targets or to bypass h2 server-side stream serialisation.- Same API shape — only the constructor differs between the two.
- utls TLS fingerprint via
WithHelloID(Chrome by default). - HeaderOrderKey + PHeaderOrderKey honoured on the wire for both engines.
Documented limitations
- HTTPS only (no h2c, no plaintext h1)
- Bodies must fit in initial 65535-byte stream window (no upstream
WINDOW_UPDATE) - h2 SETTINGS sent are Go h2 defaults, not Chrome's (fingerprint leak vs h2-aware defenders)
- HPACK encoder is per-Engine; not safe for concurrent use across multiple Gates on one Engine
- Empty-body requests use an empty DATA-with-END_STREAM tail (every mainstream h2 stack accepts; overly-pedantic servers may RST — use a body or fall back to H1Engine)
Other changes
scripts/build.sh: latent basename-collision bug in generated-banner skip-list. Now compares relative paths under_overlay/so overlay files don't accidentally suppress banners on unrelated upstream-vendored files sharing a basename.
Changes since v1.26.0
- New
racingsubpackage (~1300 lines including tests + README) scripts/build.shoverlay path comparison fix
Authorized use only
The racing package is a security-testing tool. Use it only against systems you own or have written permission to test.
v1.26.0 — Go 1.26.3 + utls v1.8.2
Upstream Go: go1.26.3
utls: v1.8.2
go.mod directive: go 1.26.0
Supported Go versions: 1.26.0 – 1.26.3
First dhttp release on Go 1.26.x
Tracks upstream Go 1.26.3. Includes the new Transport.NewClientConn HTTP/2 surface (clientconn.go/clientconn_test.go), the new internal/goexperiment runtime-flag package required by pprof, hybrid MLKEM TLS additions, and assorted upstream restructures.
dhttp impact
- Vendored
internal/goexperiment(new entry inINTERNAL_DEPSand the import rewriter). - Refreshed
transport.goagainst the upstream restructure (22 of 23 anchored hunks shifted upstream, so the rebase took the form of "take vanilla, re-apply dhttp mods" rather than text patching). transport_dial_test.gotaken upstream verbatim (no fork mods to it).clientconn_test.gofunction signatures bumped from*testing.Ttotesting.TBto match the newrunSynctestcontract.
Changes since v1.25.0
- Bumped upstream tracking
go1.25.10→go1.26.3 go.moddirectivego 1.25.0→go 1.26.0- utls unchanged (
v1.8.2) - HTTP/2 ClientConn surface exposed via
Transport.NewClientConn - All previous fixes (Content-Length, header-ordering hooks in httpcommon) carry forward
v1.25.0 — Go 1.25.10 + utls v1.8.2
Upstream Go: go1.25.10
utls: v1.8.2
go.mod directive: go 1.25.0
Supported Go versions: 1.25.0 – 1.25.10
First dhttp release on Go 1.25.x
Tracks upstream Go 1.25.10. The biggest internal restructure: Go 1.25 promoted synctest from internal/ to public testing/synctest and refactored a chunk of h2_bundle.go's encodeHeaders / validateHeaders into a new net/http/internal/httpcommon package.
dhttp impact
- Vendored
net/http/internal/httpcommon(newINTERNAL_DEPSentry). - Moved the HeaderOrder + PHeaderOrder hooks from the old
h2_bundle.goencodeHeadersintohttpcommon.EncodeHeaders(the new home). HTTP/2 pseudo-header ordering, request-header ordering, and the multi-codecAccept-Encodingdefault (gzip, deflate, br, zstd) all work as before. - Removed orphan
http2encodeHeaders/http2validateHeaders/http2errNilRequestURLfromh2_bundle.go; the new path routes throughhttpcommon.EncodeHeaders. validateHeadersinhttpcommonskips the magic ordering keys so they don't trip the header-field-name validator.- New upstream files
csrf.go/csrf_test.go(CrossOriginProtection) vendor through unmodified.
Changes since v1.24.1
- Bumped upstream tracking
go1.24.13→go1.25.10 go.moddirectivego 1.24.0→go 1.25.0- utls unchanged (
v1.8.2) - Header-ordering hooks relocated to the new httpcommon package
- Includes the Content-Length fix from v1.24.1
v1.24.1 — Go 1.24.13 + utls v1.8.2 (Content-Length fix)
Upstream Go: go1.24.13
utls: v1.8.2
go.mod directive: go 1.24.0
Supported Go versions: 1.24.0 – 1.24.13
Bug fix release
Fixes a regression where dhttp stripped Content-Length and Content-Encoding from every response (not just compressed ones). After this fix:
res.ContentLengthis set correctly for plain responsesres.Header.Get("Content-Length")returns the value the server sent- Streaming and length-aware consumers (e.g. file servers, range requests) work as expected
Affected both HTTP/1.1 and HTTP/2 paths. Root cause: dhttp's multi-codec auto-decompression extended the gzip-only path but dropped the Content-Encoding == "gzip" guard that vanilla net/http uses before stripping. The fix restores the guard, gated on Content-Encoding matching one of the supported codecs (gzip, br, deflate, zstd).
Recommended upgrade
Anyone on v1.24.0 should upgrade immediately:
go get github.com/dteh/dhttp@v1.24.1
Changes since v1.24.0
- Fix Content-Length stripped on every non-compressed response (transport.go + h2_bundle.go)
Tests recovered as canaries: TestEarlyHintsRequest, TestFileServerMethods, TestTrailersServerToClient, ExampleDumpResponse.
v1.24.0 — Go 1.24.13 + utls v1.8.2
Upstream Go: go1.24.13
utls: v1.8.2
go.mod directive: go 1.24.0
Supported Go versions: 1.24.0 – 1.24.13
⚠️ Known issue: this release stripsContent-Lengthfrom every uncompressed response (res.ContentLength == -1,res.Header.Get("Content-Length") == ""). Usev1.24.1which fixes this.
First dhttp release on Go 1.24.x
This is the first release using the new patch-series workflow. The repo now tracks upstream Go via patches/*.patch + overlay/* + scripts/build.sh; consumers see the regenerated source committed at this tag.
Changes since v0.1.0
- Migrated from
git filter-repo+ merge to a Debian-distro-style patch-series workflow (see README) - Bumped upstream tracking from
go1.24rc2→go1.24.13 - Bumped utls from
v1.6.7→v1.8.2(Chrome 133 support;cloudflare/circlindirect dep dropped) - Fixed redundant
User-Agenttrace callback (TestHeaderOrderHTTP1) - Restructured
internal/to match new vendoring