diable prflx over relay for firefox (#1226)
* Disable prflx over relay for firefox * remove ice lite change * solve comment * disable prflx for publisher too
This commit is contained in:
@@ -32,6 +32,7 @@ type WebRTCConfig struct {
|
||||
TCPMuxListener *net.TCPListener
|
||||
Publisher DirectionConfig
|
||||
Subscriber DirectionConfig
|
||||
ExternalIP string
|
||||
}
|
||||
|
||||
type ReceiverConfig struct {
|
||||
@@ -83,6 +84,7 @@ func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, err
|
||||
s.SetIPFilter(filter)
|
||||
}
|
||||
|
||||
var confExternalIP string
|
||||
// force it to the node IPs that the user has set
|
||||
if externalIP != "" && (conf.RTC.UseExternalIP || (conf.RTC.NodeIP != "" && !conf.RTC.NodeIPAutoGenerated)) {
|
||||
if conf.RTC.UseExternalIP {
|
||||
@@ -92,6 +94,7 @@ func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, err
|
||||
}
|
||||
logger.Debugw("using external IPs", "ips", ips)
|
||||
s.SetNAT1To1IPs(ips, webrtc.ICECandidateTypeHost)
|
||||
confExternalIP = externalIP
|
||||
} else {
|
||||
s.SetNAT1To1IPs([]string{externalIP}, webrtc.ICECandidateTypeHost)
|
||||
}
|
||||
@@ -237,6 +240,7 @@ func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, err
|
||||
TCPMuxListener: tcpListener,
|
||||
Publisher: publisherConfig,
|
||||
Subscriber: subscriberConfig,
|
||||
ExternalIP: confExternalIP,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user