-
Notifications
You must be signed in to change notification settings - Fork 894
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
Support Unstoppable Domains via DNS over HTTPS behind a feature flag #7702
Conversation
dc11193
to
6b4853e
Compare
9b1c406
to
8f0651f
Compare
256ced6
to
5cff9ce
Compare
"//net/*", | ||
"//services/network/*", | ||
] | ||
+ friend += brave_dns_friend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add our test target as friend to these targets otherwise it will fail the gn_check for dns_transaction_unittest.cc
DCHECK(secure_); | ||
|
||
size_t doh_server_index = dns_server_iterator_->GetNextAttemptIndex(); | ||
+ BRAVE_MAKE_HTTP_ATTEMPT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to skip the DoH server we added for non-target TLDs (ex: non-crypto domains) when doing name resolution.
550b2ee
to
43fa128
Compare
43fa128
to
e29bfde
Compare
@@ -20,7 +20,19 @@ Polymer({ | |||
showRestartToast_: Boolean, | |||
torEnabled_: Boolean, | |||
widevineEnabled_: Boolean, | |||
disableTorOption_: Boolean | |||
disableTorOption_: Boolean, | |||
udEnabled_: Boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't abbreviate, it makes it much harder to find things when searching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7b47bd1
cb6294d
to
fbe1607
Compare
11a3365
to
5446cc6
Compare
- Do not abbreviate unstoppable domains in brave_default_extensions_page - Add comment to stub_resolver_config_reader override - Separate Brave's own DnsTransaction unit tests - Remove patch of stub_resolver_config_reader.cc and settings_secure_dns_handler.cc - Update test - Move browser/unstoppable_domains into its own target
5cac257
to
b612d3c
Compare
Before we were overriding SplitGroup and we will miss adding our DoH resolver if doh_templates is empty.
b612d3c
to
c3fc742
Compare
…nfig_reader.cc Add it back due to chromium_src override has duplicate codes which is risky.
CI has post-init failures only which are due to vulnerabilities found by audit_deps and unrelated to this PR, merging. |
Support Unstoppable Domains via DNS over HTTPS behind a feature flag
This PR adds support of Unstoppable Domains via public DoH endpoint https://resolver.unstoppable.io/dns-query provided by Unstoppable Domains, which currently is just a redirect to Cloudflare server https://eth.resolver.cloudflare-eth.com/dns-query without any logging.
This endpoint will only be used for name resolution if user set the resolve method to
Public DNS over HTTPS server
, and it will only be used for name resolution of domains ended with.crypto
. The way we achieve this in the PR is hooking in where chromium updates the secure dns configuration in network service, add the custom servers if pref is set to public DoH. These added custom servers will be skipped for non-crypto domains before making actual DNS attempt in DNS transactions.An interstitial page will be shown to users to opt in when users try to load *.crypto domains.
New setting for resolve method is added:
Resolves brave/brave-browser#14099
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed).Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on.
Test Plan:
This site can’t be reached
.Go to settings, search for unstoppable, there should be no unstoppable domains resolve method setting.
Go to brave://flags and search for unstoppable and enable the feature flag.
Click Disable, should now see site can't be reached and
Method to resolve unstoppable domains
in brave://settings should now beDisabled
.Change the resolve method setting back to ask and visit brave.crypto again.
Opt-in interstitial should be shown again, and this time click
Proceed
.Page should be loaded now. (Note that there will be a brief moment that it is showing site is not reached while the page is loading, this is a known and will be addressed in a new issue.)
Method to resolve unstoppable domains
in brave://settings should now bePublic DNS over HTTP server
.Open a new tab and visit brad.crypto, page should be loaded normally without any interstitial pages.