Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable CNAME uncloaking when a proxy extension with a socks fallback is enabled #10742

Merged
merged 1 commit into from
Oct 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions browser/net/brave_ad_block_tp_network_delegate_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ void UseCnameResult(scoped_refptr<base::SequencedTaskRunner> task_runner,
// If only particular types of network traffic are being proxied, or if no
// proxy is configured, it should be safe to continue making unproxied DNS
// queries. However, in SingleProxy mode all types of network traffic should go
// through the proxy, so additional DNS queries should be avoided.
// through the proxy, so additional DNS queries should be avoided. Also, in the
// case of per-scheme proxy configurations, a fallback for any non-matching
// request can be configured, in which case additional DNS queries should be
// avoided as well.
bool ProxySettingsAllowUncloaking(content::BrowserContext* browser_context) {
DCHECK(browser_context);

Expand All @@ -269,7 +272,10 @@ bool ProxySettingsAllowUncloaking(content::BrowserContext* browser_context) {
net::ProxyConfigService::ConfigAvailability::CONFIG_VALID) {
// PROXY_LIST corresponds to SingleProxy mode.
if (config.value().proxy_rules().type ==
net::ProxyConfig::ProxyRules::Type::PROXY_LIST) {
net::ProxyConfig::ProxyRules::Type::PROXY_LIST ||
(config.value().proxy_rules().type ==
net::ProxyConfig::ProxyRules::Type::PROXY_LIST_PER_SCHEME &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update the function comment, it describes only SingleProxy aka PROXY_LIST, not PROXY_LIST_PER_SCHEME

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, updated the comment

!config.value().proxy_rules().fallback_proxies.IsEmpty())) {
can_uncloak = false;
}
}
Expand Down