6. Implementation Guidance
6. Implementation Guidance
Browsers (User Agents) SHOULD implement the mDNS technique to protect private IP addresses while preserving local connectivity.
- Handling mDNS: When generating a host candidate for a private IP, the UA generates a random UUID, registers it via mDNS, and uses
<uuid>.localas the address in the ICE candidate. - Resolution: When a UA receives a candidate with a
.localhostname, it attempts to resolve it using mDNS. If resolution succeeds (meaning the peer is on the same LAN), it proceeds with connectivity checks.
This mechanism ensures that:
- Remote peers (not on the LAN) cannot learn the private IP.
- Local peers (on the LAN) can still connect directly.
- The application JavaScript sees only the UUID hostname, not the IP.