Commit graph

14 commits

Author SHA1 Message Date
Kreato
50521e8dbd
feat: add DPI bypass for DTLS records in CONNECT tunnels
Previously, HandleClientHello rejected non-TLS (non-0x16) and DTLS records,
causing Discord voice chat CONNECT tunnels to be silently dropped.

- Non-TLS data: written through unchanged (passthrough)
- DTLS records (version 0xFE): parsed with full 13-byte header, fragmented
  with the same split/write logic used for TLS ClientHello

Fixes Discord voice 'DTLS connecting' stuck state behind ihtc proxy.
2026-06-01 22:15:58 +03:00
Kreato
4d68eef67e
fix: make TestBadGateway correct on all platforms
The test expected client.Get() to return a transport-level error for
unreachable targets, but the proxy converts dial errors into HTTP 502
responses. On x86_64-linux the kernel returns EHOSTUNREACH immediately,
the proxy returns 502, and err == nil. On macOS the 5s client timeout
fires first, giving a context error (passing by accident).

Also add Nix CI workflow building on all 4 supported platforms.
2026-06-01 21:50:17 +03:00
Kreato
94c0ae955a
refactor: change --refrag from dummy records to min-chunk-count approach
Replace the dummy TLS record injection mechanism with a minimum chunk count
approach. Instead of prepending fake TLS records before the ClientHello, the
new approach ensures the ClientHello itself is split into at least --refrag
chunks, which is more effective and idiomatic.

- Default --refrag changed from 1 to 0 (disabled)
- Removed buildDummyRecords() and the associated dummy record injection
- Added splitRange() helper function
- Split() now enforces a minimum chunk count via re-splitting when needed
2026-06-01 02:00:45 +03:00
Kreato
40052c65fa
feat: add --refrag for dummy TLS record injection 2026-06-01 01:36:22 +03:00
Kreato
85f80ef4af
fix: --regex non-matching hosts passthrough instead of reject 2026-06-01 01:30:35 +03:00
Kreato
cd136bb063
feat: auto proxy configuration support (--auto-proxy flag) 2026-06-01 01:16:51 +03:00
Kreato
07e2c4ee36
fix: normalize host:port for CONNECT to handle IPv6 addresses 2026-06-01 01:05:04 +03:00
Kreato
a32c1e9c0b
fix: hop-by-hop header filtering, upstream timeout, hijack logging 2026-06-01 00:39:35 +03:00
Kreato
336ec57507
fix: race condition, tunnel relay, error handling 2026-06-01 00:36:44 +03:00
Kreato
5929d69c3c
feat: add HTTP forward proxy with CONNECT tunneling 2026-06-01 00:31:02 +03:00
Kreato
48b1054bc5
fix: off-by-one, TLS validation, test writeFragmented 2026-06-01 00:26:00 +03:00
Kreato
f5e0edbed0
feat: add TLS ClientHello fragmentation engine 2026-06-01 00:22:23 +03:00
Kreato
f91ef164cf
fix: wire Level type into logger API 2026-06-01 00:20:00 +03:00
Kreato
ee5df8dfdc
feat: add structured logger 2026-06-01 00:15:08 +03:00