Skip to content

Releases

v1.26.2 — Go 1.26.5 + utls v1.8.2

Choose a tag to compare

@dteh dteh released this 22 Jul 22:13

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 @latest resolves to v1.27.0, not this release. A mis-numbered v1.27.0 tag (upstream is still go1.26.x) already exists and outranks v1.26.2 in 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/http source is byte-identical between go1.26.3 and go1.26.5 (this release's changes were confined to internal/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:linkname directives in the vendored internal/race package (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:
    &http.HTTP2Settings{
        Settings:       []http.HTTP2Setting{{1, 65536}, {2, 0}, {4, 6291456}, {6, 262144}},
        ConnectionFlow: 15663105,
    }
    Together with ClientHelloSettings (JA3/JA4) and PHeaderOrderKey (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 a scripts/build.sh run 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

Choose a tag to compare

@dteh dteh released this 22 Jul 22:14

⚠️ 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 a v1.26.x release. 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.HTTP2Settings HTTP/2 fingerprint feature, plus the go1.26.5 upgrade, a go build -race fix, 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.0 outranks v1.26.2 in semver, go get @latest will 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)

Choose a tag to compare

@dteh dteh released this 10 Jun 22:32

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 racing subpackage (~1300 lines including tests + README)
  • scripts/build.sh overlay 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

Choose a tag to compare

@dteh dteh released this 23 May 16:45

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 in INTERNAL_DEPS and the import rewriter).
  • Refreshed transport.go against 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.go taken upstream verbatim (no fork mods to it).
  • clientconn_test.go function signatures bumped from *testing.T to testing.TB to match the new runSynctest contract.

Changes since v1.25.0

  • Bumped upstream tracking go1.25.10 → go1.26.3
  • go.mod directive go 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

Choose a tag to compare

@dteh dteh released this 23 May 16:34

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 (new INTERNAL_DEPS entry).
  • Moved the HeaderOrder + PHeaderOrder hooks from the old h2_bundle.go encodeHeaders into httpcommon.EncodeHeaders (the new home). HTTP/2 pseudo-header ordering, request-header ordering, and the multi-codec Accept-Encoding default (gzip, deflate, br, zstd) all work as before.
  • Removed orphan http2encodeHeaders / http2validateHeaders / http2errNilRequestURL from h2_bundle.go; the new path routes through httpcommon.EncodeHeaders.
  • validateHeaders in httpcommon skips 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.mod directive go 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)

Choose a tag to compare

@dteh dteh released this 23 May 16:10

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.ContentLength is set correctly for plain responses
  • res.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

Choose a tag to compare

@dteh dteh released this 23 May 16:10

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 strips Content-Length from every uncompressed response (res.ContentLength == -1, res.Header.Get("Content-Length") == ""). Use v1.24.1 which 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/circl indirect dep dropped)
  • Fixed redundant User-Agent trace callback (TestHeaderOrderHTTP1)
  • Restructured internal/ to match new vendoring