feat(browsers): add new feature to enable DNS-over-HTTP to prevent DNS leaks

This commit is contained in:
Karim shoair
2026-04-12 18:03:03 +02:00
parent 0678ed1406
commit be28fe16ec
7 changed files with 26 additions and 0 deletions
+7
View File
@@ -455,6 +455,13 @@ class BaseSessionMixin:
if config.extra_flags or extra_flags:
flags = list(set(tuple(flags) + tuple(config.extra_flags or extra_flags or ())))
if config.dns_over_https:
doh_flag = "--dns-over-https-templates=https://cloudflare-dns.com/dns-query"
if isinstance(flags, list):
flags.append(doh_flag)
else:
flags = list(flags) + [doh_flag]
self._browser_options.update(
{
"args": flags,