mirror of
https://github.com/pion/webrtc.git
synced 2025-09-27 03:25:58 +08:00
Introduce UDPMux in SettingsEngine, single-port
When set, Pion will handle ICE connections over UDPMux
This commit is contained in:
@@ -58,6 +58,7 @@ type SettingEngine struct {
|
||||
BufferFactory func(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser
|
||||
LoggerFactory logging.LoggerFactory
|
||||
iceTCPMux ice.TCPMux
|
||||
iceUDPMux ice.UDPMux
|
||||
iceProxyDialer proxy.Dialer
|
||||
disableMediaEngineCopy bool
|
||||
}
|
||||
@@ -252,6 +253,13 @@ func (e *SettingEngine) SetICETCPMux(tcpMux ice.TCPMux) {
|
||||
e.iceTCPMux = tcpMux
|
||||
}
|
||||
|
||||
// SetICEUDPMux allows ICE traffic to come through a single UDP port, drastically
|
||||
// simplifying deployments where ports will need to be opened/forwarded.
|
||||
// UDPMux should be started prior to creating PeerConnections.
|
||||
func (e *SettingEngine) SetICEUDPMux(udpMux ice.UDPMux) {
|
||||
e.iceUDPMux = udpMux
|
||||
}
|
||||
|
||||
// SetICEProxyDialer sets the proxy dialer interface based on golang.org/x/net/proxy.
|
||||
func (e *SettingEngine) SetICEProxyDialer(d proxy.Dialer) {
|
||||
e.iceProxyDialer = d
|
||||
|
Reference in New Issue
Block a user