Repository navigation
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.