Skip to content

Commit

Permalink
webRTC: do not expose local IP addresses
Browse files Browse the repository at this point in the history
Prevent leaks of local IP address and public IP address (when using VPN)

See also:
* bromite/bromite#553
* bromite/bromite#589

License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
Change-Id: Ie7785ef845eb357c826f52593efe980d983b682e
  • Loading branch information
csagan5 authored and chirayudesai committed Mar 31, 2023
1 parent d65e9f0 commit a7e6a3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chrome/browser/ui/browser_ui_prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
false);
#endif
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
blink::kWebRTCIPHandlingDefault);
blink::kWebRTCIPHandlingDisableNonProxiedUdp);
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
registry->RegisterBooleanPref(prefs::kWebRtcEventLogCollectionAllowed, false);
registry->RegisterListPref(prefs::kWebRtcLocalIpsAllowedUrls);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ WebRTCIPHandlingPolicy GetWebRTCIPHandlingPolicy(const String& preference) {
return kDefaultPublicInterfaceOnly;
if (preference == kWebRTCIPHandlingDisableNonProxiedUdp)
return kDisableNonProxiedUdp;
return kDefault;
if (preference == kWebRTCIPHandlingDefault)
return kDefault;
return kDisableNonProxiedUdp;
}

bool IsValidPortRange(uint16_t min_port, uint16_t max_port) {
Expand Down Expand Up @@ -771,7 +773,7 @@ PeerConnectionDependencyFactory::CreatePortAllocator(
break;
}

VLOG(3) << "WebRTC routing preferences: "
LOG(INFO) << "WebRTC routing preferences: "
<< "policy: " << policy
<< ", multiple_routes: " << port_config.enable_multiple_routes
<< ", nonproxied_udp: " << port_config.enable_nonproxied_udp
Expand Down

0 comments on commit a7e6a3b

Please sign in to comment.