feat: add iroh net-diagnostics integration#139
Merged
zachsmith1 merged 6 commits intomainfrom Apr 15, 2026
Merged
Conversation
zachsmith1
added a commit
to datum-cloud/iroh-gateway
that referenced
this pull request
Apr 15, 2026
- iroh, iroh-base, iroh-relay: 0.95 -> 0.97 - iroh-proxy-utils: git dep -> crates.io 0.1.0 - Migrate endpoint builder API: DnsDiscovery -> DnsAddressLookup, presets::N0, unified bind_addr - Update metrics field access: magicsock.* -> socket.* - Replace removed metric fields with iroh 0.97 equivalents Mirrors datum-cloud/app#139.
zachsmith1
added a commit
to datum-cloud/iroh-gateway
that referenced
this pull request
Apr 15, 2026
- iroh, iroh-base, iroh-relay: 0.95 -> 0.97 - iroh-proxy-utils: git dep -> crates.io 0.1.0 - Migrate endpoint builder API: DnsDiscovery -> DnsAddressLookup, presets::N0, unified bind_addr - Update metrics field access: magicsock.* -> socket.* - Replace removed metric fields with iroh 0.97 equivalents Mirrors datum-cloud/app#139.
Integrate iroh-services net-diagnostics into the desktop app to collect anonymous network diagnostic data (NAT type, UDP connectivity, relay latency, port mapping). Key changes: - Upgrade iroh 0.95 → 0.97, iroh-proxy-utils to crates.io 0.1.0 - Add iroh-services 0.12 with net_diagnostics and client_host - New diagnostics module with opt-in/out settings persisted to disk - ClientHost registered on ListenNode router for iroh-services dial-back - One-time prompt on first launch for user consent - Settings → Privacy toggle for runtime opt-out - API key loaded from IROH_SERVICES_API_KEY env var or BUILD_IROH_SERVICES_API_KEY at build time Closes datum-cloud/enhancements#676
New dependencies (netwatch, portmapper, irpc, iroh-tickets) require rustc 1.89.
Add conns_closed, conns_direct, paths_direct, and paths_relay metrics that have equivalents in iroh 0.97's SocketMetrics.
The gateway server has been extracted into its own standalone repo at datum-cloud/iroh-gateway. Remove: - lib/src/gateway.rs and lib/src/gateway/metrics.rs - lib/templates/gateway_error.html - lib/src/tests.rs (all tests were gateway integration tests) - GatewayConfig from config.rs and repo.rs - gateway_key / gateway_config from Repo - Commands::Gateway subcommand from the CLI - askama dep from lib (only used by the gateway error template)
32943fe to
0729523
Compare
…loud/iroh-gateway
scotwells
approved these changes
Apr 15, 2026
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.
Summary
Integrate iroh-services net-diagnostics into the desktop app for anonymous network diagnostic data collection (NAT type, UDP connectivity, relay latency, port mapping).
Closes datum-cloud/enhancements#676
Changes
Migrate Iroh-gateway
Dependency upgrades
0.95→0.970.1.00.97→0.99iroh-services 0.12withnet_diagnostics+client_hostfeaturesNet diagnostics
lib/src/diagnostics.rsmoduleClientHostregistered onListenNoderouter so iroh-services can dial backNetDiagnosticsCap::GetAnygranted on startup (background task)IROH_SERVICES_API_KEYenv var orBUILD_IROH_SERVICES_API_KEYat build timeUser consent
diagnostics_settings.ymlTesting
connecting to iroh-services for net diagnostics remote=ab2be4c4b2→Granted NetDiagnosticsCap::GetAny to iroh-servicesNotes
n0des-localworkspace member excluded (needs separate iroh-n0des → iroh-services migration for tickets feature).envfiles needIROH_SERVICES_API_KEYfor local dev; CI builds should setBUILD_IROH_SERVICES_API_KEY