We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force pion/ice to use a specific network interface for ICE gathering by using
settingEngine.SetInterfaceFilter(func(iface string) bool { return iface == "eth0" // wlan1 })
I expect not to see any IP related to the filtered list. But I see the public IPs of both adapters
Here is the full example
package main import ( "fmt" "github.com/pion/webrtc/v3" ) func main() { config := webrtc.Configuration{ ICEServers: []webrtc.ICEServer{ { URLs: []string{"stun:stun.l.google.com:19302"}, }, }, } settingEngine := webrtc.SettingEngine{} settingEngine.SetInterfaceFilter(func(iface string) bool { return iface == "eth0" // wlan1 }) mediaEngine := webrtc.MediaEngine{} mediaEngine.RegisterDefaultCodecs() api := webrtc.NewAPI(webrtc.WithSettingEngine(settingEngine), webrtc.WithMediaEngine(&mediaEngine)) peerConnection, _ := api.NewPeerConnection(config) peerConnection.OnICEGatheringStateChange(func(webrtc.ICEGathererState) { fmt.Println("ICE Gathering State has changed", peerConnection.ICEGatheringState()) }) peerConnection.OnICECandidate(func(c *webrtc.ICECandidate) { if c == nil { return } fmt.Println("ICE", c.ToJSON()) }) gatherComplete := webrtc.GatheringCompletePromise(peerConnection) offer, err := peerConnection.CreateOffer(nil) if err != nil { panic(err) } else if err = peerConnection.SetLocalDescription(offer); err != nil { panic(err) } <-gatherComplete }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Your environment.
What did you do?
Force pion/ice to use a specific network interface for ICE gathering by using
What did you expect?
I expect not to see any IP related to the filtered list. But I see the public IPs of both adapters
Here is the full example
The text was updated successfully, but these errors were encountered: