mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Disable UDP and STUN when proxy is set
This commit is contained in:
parent
9a5698762b
commit
087a188ff3
1 changed files with 9 additions and 0 deletions
|
@ -2210,6 +2210,15 @@ PeerConnection::InitializePortAllocator_n(
|
|||
RTC_LOG(LS_INFO) << "TCP candidates are disabled.";
|
||||
}
|
||||
|
||||
if (configuration.proxy_info.type != rtc::PROXY_NONE) {
|
||||
port_allocator_flags |= cricket::PORTALLOCATOR_DISABLE_UDP |
|
||||
cricket::PORTALLOCATOR_DISABLE_UDP_RELAY |
|
||||
cricket::PORTALLOCATOR_DISABLE_STUN |
|
||||
cricket::PORTALLOCATOR_DISABLE_ADAPTER_ENUMERATION |
|
||||
cricket::PORTALLOCATOR_DISABLE_DEFAULT_LOCAL_CANDIDATE;
|
||||
RTC_LOG(LS_INFO) << "UDP candidates, relay over UDP, and STUN are disabled.";
|
||||
}
|
||||
|
||||
if (configuration.candidate_network_policy ==
|
||||
kCandidateNetworkPolicyLowCost) {
|
||||
port_allocator_flags |= cricket::PORTALLOCATOR_DISABLE_COSTLY_NETWORKS;
|
||||
|
|
Loading…
Reference in a new issue