mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWebView+RequestSever: Wire up a validate-DNSSEC setting option to RS
This commit is contained in:
parent
b24fb0a836
commit
4b5664f867
Notes:
github-actions[bot]
2025-06-11 16:17:43 +00:00
Author: https://github.com/alimpfard
Commit: 4b5664f867
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4709
Reviewed-by: https://github.com/ADKaster ✅
9 changed files with 39 additions and 19 deletions
|
@ -40,12 +40,12 @@ struct ApplicationSettingsObserver : public SettingsObserver {
|
|||
Application::request_server_client().async_set_use_system_dns();
|
||||
},
|
||||
[](DNSOverTLS const& dns_over_tls) {
|
||||
dbgln("Setting DNS server to {}:{} with TLS", dns_over_tls.server_address, dns_over_tls.port);
|
||||
Application::request_server_client().async_set_dns_server(dns_over_tls.server_address, dns_over_tls.port, true);
|
||||
dbgln("Setting DNS server to {}:{} with TLS ({} local dnssec)", dns_over_tls.server_address, dns_over_tls.port, dns_over_tls.validate_dnssec_locally ? "with" : "without");
|
||||
Application::request_server_client().async_set_dns_server(dns_over_tls.server_address, dns_over_tls.port, true, dns_over_tls.validate_dnssec_locally);
|
||||
},
|
||||
[](DNSOverUDP const& dns_over_udp) {
|
||||
dbgln("Setting DNS server to {}:{}", dns_over_udp.server_address, dns_over_udp.port);
|
||||
Application::request_server_client().async_set_dns_server(dns_over_udp.server_address, dns_over_udp.port, false);
|
||||
dbgln("Setting DNS server to {}:{} ({} local dnssec)", dns_over_udp.server_address, dns_over_udp.port, dns_over_udp.validate_dnssec_locally ? "with" : "without");
|
||||
Application::request_server_client().async_set_dns_server(dns_over_udp.server_address, dns_over_udp.port, false, dns_over_udp.validate_dnssec_locally);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -110,6 +110,7 @@ ErrorOr<void> Application::initialize(Main::Arguments const& arguments)
|
|||
Optional<u16> dns_server_port;
|
||||
bool use_dns_over_tls = false;
|
||||
bool layout_test_mode = false;
|
||||
bool validate_dnssec_locally = false;
|
||||
bool log_all_js_exceptions = false;
|
||||
bool disable_site_isolation = false;
|
||||
bool enable_idl_tracing = false;
|
||||
|
@ -171,6 +172,7 @@ ErrorOr<void> Application::initialize(Main::Arguments const& arguments)
|
|||
args_parser.add_option(dns_server_address, "Set the DNS server address", "dns-server", 0, "host|address");
|
||||
args_parser.add_option(dns_server_port, "Set the DNS server port", "dns-port", 0, "port (default: 53 or 853 if --dot)");
|
||||
args_parser.add_option(use_dns_over_tls, "Use DNS over TLS", "dot");
|
||||
args_parser.add_option(validate_dnssec_locally, "Validate DNSSEC locally", "dnssec");
|
||||
|
||||
args_parser.add_option(Core::ArgsParser::Option {
|
||||
.argument_mode = Core::ArgsParser::OptionArgumentMode::Required,
|
||||
|
@ -220,8 +222,8 @@ ErrorOr<void> Application::initialize(Main::Arguments const& arguments)
|
|||
.profile_helper_process = move(profile_process_type),
|
||||
.dns_settings = (dns_server_address.has_value()
|
||||
? Optional<DNSSettings> { use_dns_over_tls
|
||||
? DNSSettings(DNSOverTLS(dns_server_address.release_value(), *dns_server_port))
|
||||
: DNSSettings(DNSOverUDP(dns_server_address.release_value(), *dns_server_port)) }
|
||||
? DNSSettings(DNSOverTLS(dns_server_address.release_value(), *dns_server_port, validate_dnssec_locally))
|
||||
: DNSSettings(DNSOverUDP(dns_server_address.release_value(), *dns_server_port, validate_dnssec_locally)) }
|
||||
: OptionalNone()),
|
||||
.devtools_port = devtools_port,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue