fix(ice): skip loopback for STUN srflx + add UDP TURN relay candidate gathering#796
Open
nightness wants to merge 1 commit intowebrtc-rs:masterfrom
Open
fix(ice): skip loopback for STUN srflx + add UDP TURN relay candidate gathering#796nightness wants to merge 1 commit intowebrtc-rs:masterfrom
nightness wants to merge 1 commit intowebrtc-rs:masterfrom
Conversation
…candidate gathering - fix(ice): skip loopback addresses (127.x.x.x, ::1) when gathering STUN srflx candidates Prevents long timeout when STUN server tries to reflect a loopback address (webrtc#778) - feat(ice): add TURN relay candidate gathering (UDP) in RTCIceGatherer Connects to configured TURN servers and gathers relay candidates for NAT traversal 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.
Summary
Two related ICE improvements to
RTCIceGatherer:1. Skip loopback addresses for STUN srflx candidates (webrtc#778)
Loopback addresses (
127.x.x.x,::1) are never reachable from remote peers. When a STUN server tries to reflect a loopback source address, it either fails immediately or causes a long timeout that stalls ICE gathering for all other candidates. This fix skips loopback candidates before attempting STUN resolution.2. UDP TURN relay candidate gathering
RTCIceGatherernow connects to configured TURN servers (fromRTCIceServerwithusername/credential) and gathers relay candidates. This enables NAT traversal in symmetric NAT scenarios where srflx candidates are insufficient.Test plan
cargo test -p webrtc— all existing tests pass🤖 Generated with Claude Code