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 DoH is enabled with an HTTPS proxy #11164

Merged
merged 2 commits into from
Nov 22, 2021

Conversation

antonok-edm
Copy link
Collaborator

Resolves brave/brave-browser#15038

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

  1. Find an HTTPS proxy with a location distinct from your own internet provider. Some free public ones are available at https://geonode.com/free-proxy-list, but be warned - they are slow and unreliable!
  2. Enable this as a "system proxy". On Linux, you can do this by exporting the https_proxy environment variable before starting the browser, e.g. export https_proxy=https://127.0.0.1:8080 (replace the IP and port as necessary). On Windows and macOS, visit brave://settings, search for proxy, and select Open your computer's proxy settings, then configure it there.
  3. Once the proxy is configured (it might require a browser restart on macOS/Windows - I'm not sure), visit https://dnsleaktest.com. If the proxy is configured correctly, the page should show the proxy's public IP address rather than your own.
  4. Run the Standard test to completion. In my experience, this takes a very long time to complete using free public proxies, sometimes failing and requiring multiple refreshes. The test should complete with at least 1 Servers found.
  5. Once the test is completed, you should see the list of servers appear. Verify that they are all in the proxy's region, rather than near your physical location.

@diracdeltas
Copy link
Member

this approach sgtm but i wonder if the ProxySettingsAllowUncloaking checks can be refactored into a general-purpose method, like ShouldAllowResolveDNS, which must be called before Brave issues a DNS request that isn't usually issued - for instance in #8068. cc @spylogsster

@iefremov
Copy link
Contributor

it looks good, can we add a test?

@antonok-edm
Copy link
Collaborator Author

@iefremov we weren't able to add proxy setting tests when I investigated last time, but I added StubResolverConfigReader to our unit tests.

@antonok-edm antonok-edm force-pushed the cname-uncloaking-https-proxy-doh branch from 748d1b5 to 8929599 Compare November 19, 2021 22:03
@antonok-edm antonok-edm merged commit c19dba7 into master Nov 22, 2021
@antonok-edm antonok-edm deleted the cname-uncloaking-https-proxy-doh branch November 22, 2021 16:05
@antonok-edm antonok-edm added this to the 1.34.x - Nightly milestone Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security] DNS Leak appears with HTTP Proxy
3 participants