Repository navigation
feat: desync-probe, a diagnostics tool for testing on a network - #9
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.desync-proberuns 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 writesreport.jsonnext 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.-dnsto bypass it, Termuxresolv.conffallback on Android); per site × strategy: dial,WrapConn, TLS with real certificate verification (ALPN h2/http1.1),HEAD /without redirects. Outcome per pairworks/flaky/fails/not-runwith 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.-list-presets): baselinenone, 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 fromOptions.Key(); presets the OS cannot run are listed with the reason fromPlatformCapabilities().Unsupported. A custom strategy indesync-socksnotation can be added.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 asnon-public; UTC only.controller.Prober(success returnsApplicationproof), so the same code can drive automatic discovery later; a test drivescontroller.Selectwith it.binaries.ymlbuildsdesync-probeanddesync-socksfor windows (amd64, arm64), linux (amd64, arm64), darwin (amd64, arm64) and android/arm64 withSHA256SUMS; artifact on pushes tomain, release assets onv*tags (gh releasewithGITHUB_TOKEN).ci.ymlbuilds the tool too. Actions pinned by the SHAsci.ymlalready uses.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).