Comments (5)
Hi, I haven't try to reproduce your issue. In my opinion, you try to use 2 local address but only one external IP And you want to use udp mux?? Such as local ip (192.168.10.10 / 192.168.10.20, multiplex udp port 3000, they have the same external ip. [128.29.20.30]). Maybe the extIPMapper should specify the relation 192.168.10.10->128.29.20.30, rather than set all ipv4 external ip to 128.29.20.30
By the way, I looked through issues because I found the multiudpmux can't works when the remote use multiudpmux too... Such as two sfu cascaded, but they all use one single udp port.
from ice.
Its just about how many local interfaces I have. When inside docker container, those IPs will be 127.0.0.1
and 172.18.0.10
(dynamic, cannot really specify relation) but my real external IP is 192.168.1.10
.
This issue is actually generally about wrong handling any UDP duplicate candidates, if the number of them is an even number. This happens to be easily reproducible with NAT 1:1, but its not limited to only this usecase.
Should be as following:
- 1 canidate: OK
- 2 duplicate candidates: First added, Second overwrites first one but immediately closes and removes it, so we are left with no canidates.
- 3 duplicate candidates: After adding and removing one, thrid one is left intact, so OK:
from ice.
Thanks @m1k1o . Got it! Maybe a temporary workaround is to limit your candidates to certain specified range that you want to avoid it. I use the below code to specify candidates now.
// se
se := webrtc.SettingEngine{}
// handle candidates
nw := vnet.NewNet(nil)
if len(c.WebRTC.Candidates) > 0 {
candidates := c.WebRTC.Candidates
if ifs, err := nw.Interfaces(); err == nil {
for _, ifc := range ifs {
if addrs, err := ifc.Addrs(); err == nil {
tmpIfc := vnet.NewInterface((net.Interface)(ifc.InterfaceBase))
for _, c := range candidates {
for _, addr := range addrs {
if strings.HasPrefix(addr.String(), c+"/") {
tmpIfc.AddAddr(addr)
}
}
}
*ifc = *tmpIfc
}
}
}
}
se.SetVNet(nw)
from ice.
@m1k1o You can use MultiUDPMux (NewMultiUDPMuxFromPort
) to listen on multiple interfaces for udp mux, then each muxed connection is managed by corresponding UDPMux, will not be closed incorrectly
from ice.
@cnderrauber yes, that actually fixes my issue. But this makes the change backwards incompatible, although it should still work the same way but only with deprecation warning.
from ice.
Related Issues (20)
- TestAcceptAggressiveNomination failed in CI HOT 2
- Connection failure when listening on multiple interfaces and overriding host candidate HOT 5
- Connection upgrade HOT 3
- Remove invalidTCPMux
- Rename Agent.startOnConnectionStateChangeRoutine() to Agent.startRoutines() HOT 1
- Simplify Agent.updateConnectionState() HOT 1
- Reenable IPv6 UDPMux tests in i386
- Active TCP candidates? HOT 7
- Support server reflexive TCP candidate type HOT 13
- Fix type of CandidatePairState enum
- TestAgentActiveTCP test is failing due to data race
- Active TCP performs network operations in main thread HOT 7
- Connection failing to TCP candidate when listening on multiple interfaces using `MultiTCPMux` and `NAT1To1IPs` HOT 5
- Noisy warnings if TURN/STUN host is not reachable via IPv6
- Panic when adding candidate HOT 5
- bug(log): webrtc using ice will print wrong log HOT 1
- ice v2 depends on transport v2.2.2, which had a breaking change HOT 1
- Candidate type is not changed from peer-reflexive to host HOT 1
- Allow users to pass custom 'CandidateSelectorControlling` and `CandidateSelectorControlled` HOT 3
- ConnectionState changes may be reported incorrectly HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ice.