Set the proxy dialer

Sets the proxy dialer in the ice package.

Relates to pion/ice#284
This commit is contained in:
Assad Obaid
2020-10-08 11:36:27 +02:00
committed by Sean DuBois
parent 3f53b70405
commit 6e72493517
5 changed files with 17 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/pion/logging"
"github.com/pion/sdp/v3"
"github.com/pion/transport/vnet"
"golang.org/x/net/proxy"
)
// SettingEngine allows influencing behavior in ways that are not
@@ -56,6 +57,7 @@ type SettingEngine struct {
vnet *vnet.Net
LoggerFactory logging.LoggerFactory
iceTCPMux ice.TCPMux
iceProxyDialer proxy.Dialer
}
// DetachDataChannels enables detaching data channels. When enabled
@@ -309,3 +311,8 @@ func (e *SettingEngine) getSDPExtensions() map[SDPSectionType][]sdp.ExtMap {
}
return e.sdpExtensions
}
// SetProxyDialer sets the proxy dialer interface based on golang.org/x/net/proxy.
func (e *SettingEngine) SetICEProxyDialer(d proxy.Dialer) {
e.iceProxyDialer = d
}