APP-coturn-staging-routing: add dialdbg relay testing flags and fix panics#170
Draft
danielbotros wants to merge 1 commit intomainfrom
Draft
APP-coturn-staging-routing: add dialdbg relay testing flags and fix panics#170danielbotros wants to merge 1 commit intomainfrom
danielbotros wants to merge 1 commit intomainfrom
Conversation
…anics - Add --force-relay, --force-p2p, --relay-host, --signaling-server, --disable-mdns flags to viam-dialdbg CLI for targeted TURN relay testing - Apply relay-only ICE transport policy when --force-relay is set - Filter ICE servers by host substring when --relay-host is set - Fix auth: when signaling_server_override is set, authenticate against the override server instead of the robot's FQDN - Fix port stripping: use .host() instead of full authority so the rpc-host header does not include the port number - Fix stats.rs panic: use checked_duration_since to avoid panicking when a candidate timestamp is newer than now Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
WIP
Summary
--force-relay,--force-p2p,--relay-host,--signaling-server,--disable-mdnsflags toviam-dialdbgfor targeted TURN relay testingdial.rs: whensignaling_server_overrideis set, authenticate against the override server rather than the robot FQDNdial.rs: use.host()instead of.authority()so therpc-host/domainheader does not include the port numberstats.rs: usechecked_duration_since().unwrap_or_default()to avoid panicking when a candidate timestamp is newer thanInstant::now()Background
Investigation into why rust-utils panicked when making TURN relay connections against coturn v3.9.0 (worked on v3.6.1).
Root cause: RFC 8656 enforcement in coturn 3.9.0 rejects
CREATE_PERMISSIONrequests targeting private/loopback IPs with a STUN 403 error. Due to a coturn 3.9.0 bug, the 403 reason phrase contains0xffffffff(invalid UTF-8) instead of the ASCII string"Forbidden". The stun-0.7.0 crate'sErrorCodeAttribute::fmtreturnsErr(fmt::Error)on non-UTF-8 bytes; turn-0.9.0'srelay_conn.rsthen callsformat!()on that brokenDisplayimpl, which panics.The
--force-relayand--relay-hostflags were added so the TURN relay path can be exercised directly fromviam-dialdbgfor future testing.Test plan
cargo build --features dialdbgcompiles cleanlyviam-dialdbg --force-relay --relay-host <turn-host> <robot-fqdn>establishes a relay connectionviam-dialdbg --force-p2p <robot-fqdn>falls back to direct P2P (no TURN servers)viam-dialdbg --signaling-server localhost:8081 <robot-fqdn>dials against a local app instance without auth panics🤖 Generated with Claude Code