Comments (2)
mdns/v2 now supports IPv6 so it can get into ICE now! Shouldn't be too difficult but we'll need to explicitly configure it
from ice.
@TA2k do you want to take a shot at this?
It may be as simple as in mdns.go
:
func createMulticastDNS(n transport.Net, networkTypes []NetworkType, mDNSMode MulticastDNSMode, mDNSName string, log logging.LeveledLogger) (*mdns.Conn, MulticastDNSMode, error) {
if mDNSMode == MulticastDNSModeDisabled {
return nil, mDNSMode, nil
}
var wantV4, wantV6 bool
if len(networkTypes) == 0 {
wantV4 = true
wantV6 = true
}
for _, nt := range networkTypes {
switch nt {
case NetworkTypeTCP4, NetworkTypeUDP4:
wantV4 = true
case NetworkTypeTCP6, NetworkTypeUDP6:
wantV6 = true
}
}
if !(wantV4 || wantV6) {
return nil, mDNSMode, errMulticastDNSNoUsableNetworkType
}
var multicastPktConnV4 *ipv4.PacketConn
if wantV4 {
addr4, mdnsErr := n.ResolveUDPAddr("udp4", mdns.DefaultAddressIPv4)
if mdnsErr != nil {
return nil, mDNSMode, mdnsErr
}
l4, mdnsErr := n.ListenUDP("udp4", addr4)
if mdnsErr != nil {
// If ICE fails to start MulticastDNS server just warn the user and continue
log.Errorf("Failed to enable mDNS, continuing in mDNS disabled mode: (%s)", mdnsErr)
return nil, MulticastDNSModeDisabled, nil
}
multicastPktConnV4 = ipv4.NewPacketConn(l4)
}
var multicastPktConnV6 *ipv6.PacketConn
if wantV6 {
addr6, mdnsErr := n.ResolveUDPAddr("udp6", mdns.DefaultAddressIPv6)
if mdnsErr != nil {
return nil, mDNSMode, mdnsErr
}
l6, mdnsErr := n.ListenUDP("udp6", addr6)
if mdnsErr != nil {
// If ICE fails to start MulticastDNS server just warn the user and continue
log.Errorf("Failed to enable mDNS, continuing in mDNS disabled mode: (%s)", mdnsErr)
return nil, MulticastDNSModeDisabled, nil
}
multicastPktConnV6 = ipv6.NewPacketConn(l6)
}
switch mDNSMode {
case MulticastDNSModeQueryOnly:
conn, err := mdns.Server(multicastPktConnV4, multicastPktConnV6, &mdns.Config{})
return conn, mDNSMode, err
case MulticastDNSModeQueryAndGather:
conn, err := mdns.Server(multicastPktConnV4, multicastPktConnV6, &mdns.Config{
LocalNames: []string{mDNSName},
})
return conn, mDNSMode, err
default:
return nil, mDNSMode, nil
}
}
but it needs some testing around interfaces that have supported ipv6 addresses https://tools.ietf.org/html/rfc8445#section-5.1.1.1 (link-local ones which are common are not allowed for security reasons of exposing the zone (I think))
from ice.
Related Issues (20)
- 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
- Please add a new release tag HOT 2
- Android 11 ListenUDP permission denine
- Start the listening port by default above 1024 HOT 1
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.