A sound implementation does not ask users to refresh until it works. Each phase has an input, an output, a timeout, and a terminal state. Modern browsers limit WebRTC interface enumeration used for fingerprinting. A host candidate may contain a .local name; browser networking resolves and checks it without exposing the private IP to application code.
WebRTC decisions need evidence from both endpoints, negotiation versions, and the selected candidate pair. One browser callback cannot reveal glare, ICE route changes, or divergence after a peer refresh.
Define the system contract first
Start from facts the data and protocol can guarantee, then decide what the interface may promise. Each rule below needs an owner, a bound, and a compatibility policy rather than an oral convention from one review.
- Accept IP addresses and mDNS hostnames, classifying protected addressing as a normal case.
- Show scope and candidate type in network diagnostics without promising every physical interface address.
- Let ICE run connectivity checks; never discard a host candidate because application code cannot resolve .local.
Treat mDNS as a browser privacy boundary, not an obstacle to bypass. Describe observable network scope and let ICE determine connectivity.
What can break that contract
Prioritize faults that silently preserve false facts: the interface looks recovered while a queue, permission, or counter has diverged. The defect often appears only on the next action.
- An IP-only parser silently drops mDNS candidates and forces same-LAN traffic through TURN.
- Diagnostics treat mDNS names as DNS failures and create a flood of meaningless alerts.
- A fingerprint panel sends names to an external resolver and creates the privacy leak mDNS was designed to prevent.
How to test the contract line by line
Observe both endpoints, persisted records, and operational signals during verification. One button state or one successful response cannot prove the complete loop.
- Capture real SDP containing .local candidates and verify parsing, deduplication, and counts.
- Connect on normal LAN, isolated guest Wi-Fi, and remote networks to verify route selection with mDNS.
- Inspect logs and analytics to ensure names or addresses cannot reconstruct a device network topology.
The release bar is clear: users understand the current state, failures stop or recover, resources stay bounded, and operators can identify the phase from minimum necessary evidence.