Skip to content

feat: desync-probe, a diagnostics tool for testing on a network - #9

Merged
Nemu-x merged 4 commits into
mainfrom
feat/probe-tool
Oct 29, 2026
Merged

Nemu-x merged 4 commits into
mainfrom
feat/probe-tool

Conversation

@Nemu-x

@Nemu-x Nemu-x commented Oct 29, 2026

Copy link
Copy Markdown
Owner

desync-probe: a diagnostics tool for testers on filtered networks. It runs the library's strategies against a list of sites and writes a report that is safe to send back.

  • No arguments needed: desync-probe runs the built-in site list (YouTube, Discord, Instagram, X, rutracker, LinkedIn, Medium and others, plus control sites) with every preset this OS supports, prints progress and a summary, and writes report.json next to the binary (or the current directory). On Windows a double-click run waits for Enter before closing. Exit code 0 whenever the measurement ran.
  • Measurement: each name resolved once (system resolver, -dns to bypass it, Termux resolv.conf fallback on Android); per site × strategy: dial, WrapConn, TLS with real certificate verification (ALPN h2/http1.1), HEAD / without redirects. Outcome per pair works / flaky / fails / not-run with the most frequent error class (timeout, reset, eof, cert, refused, unreachable, tls-alert, local, …). -repeat 2, -timeout 6s, -concurrency 8, -budget 20m; attempts interleaved across sites.
  • Presets (-list-presets): baseline none, TLS record cuts, TCP splits, random cuts, disorder, oob, disoob, split waits, fake with TTL 3/5/8, fake with a decoy SNI, fake among split pieces, disorder + fake. Each preset's ID comes from Options.Key(); presets the OS cannot run are listed with the reason from PlatformCapabilities().Unsupported. A custom strategy in desync-socks notation can be added.
  • Summary: per site the direct result and the strategies that worked, then a ranking of strategies that opened sites where the direct connection failed; a warning for sites that resolve to a non-public address (local proxy fake-IPs, block pages).
  • Report (desync-probe/v1): tool/library/Go version, OS/arch, capabilities, settings, presets, per-target DNS and attempts with timings. Privacy: no local or public address of the tester, no MAC, no host or user name; error texts rebuilt without local socket addresses and scrubbed of any IP not in the target's public answers; non-public DNS answers written as non-public; UTC only.
  • The probe implements controller.Prober (success returns Application proof), so the same code can drive automatic discovery later; a test drives controller.Select with it.
  • Binaries: new binaries.yml builds desync-probe and desync-socks for windows (amd64, arm64), linux (amd64, arm64), darwin (amd64, arm64) and android/arm64 with SHA256SUMS; artifact on pushes to main, release assets on v* tags (gh release with GITHUB_TOKEN). ci.yml builds the tool too. Actions pinned by the SHAs ci.yml already uses.
  • README: "Testing on your network" with steps for Windows, macOS, Linux and Android (Termux).

Tests (no internet): catalog filtered by capabilities, stable IDs (four pinned), report schema and privacy, loopback runs against an open server, one that resets when the first segment holds the whole SNI, a silent one and a bad certificate; error classification; concurrency and budget bounds; the controller integration. Fake presets on loopback complete on Linux and fail at TLS on Windows (loopback delivers the fake there); the test accepts both but nothing else. Checks: gofmt, go mod tidy -diff, vet windows/linux/darwin on Go 1.26.10 and 1.20.14; tests on Windows (both Go) and Linux in Docker with --network none (1.26.9 incl. -race, 1.20.14); cross builds of all targets; actionlint. Not verified: the workflow on GitHub (artifacts, release upload), macOS/Android runtime incl. the Termux resolver, the Windows double-click prompt, real filtered networks and how long a full default run takes there (worst case ≈ 9 minutes, capped by the 20-minute budget).

desync-probe resolves each target once, then for every built-in preset
dials TCP, wraps the socket with desync, completes a verified TLS handshake
and sends HEAD / over HTTP/1.1 or HTTP/2. It records dial, TLS and HTTP
outcomes with comparable error classes and timings, repeats each pair to
tell flaky from failing, and bounds concurrency, each attempt and the run.

Presets cover the library's methods and are filtered by
PlatformCapabilities, with the reason for each skipped one; their IDs are
derived from Options.Key(). A custom strategy uses the desync-socks flags.
The probe implements controller.Prober with Application proof.

The terminal summary lists, per site, the direct result and the strategies
that worked; report.json carries the tool and library version, OS,
capabilities, the catalog and results, without local or public addresses
of the tester, MAC addresses, host or user names.
The CI build job also builds desync-probe. A new Binaries workflow builds
desync-probe and desync-socks for windows, linux and darwin (amd64, arm64)
and android/arm64 with SHA256SUMS, uploads them as an artifact on every
push to main and attaches them to the release of a v* tag with gh.
…t pieces

fake-ttl5-sni (decoy ClientHello for www.wikipedia.org, randomized), split-1s-fake-ttl5 and disorder-1-fake-ttl5 exercise what the library gained after this branch started. The capability test now counts the fake presets instead of expecting four skips.
@Nemu-x
Nemu-x merged commit 1df2f1d into main Oct 29, 2026
19 checks passed
@Nemu-x
Nemu-x deleted the feat/probe-tool branch October 29, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant