mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-27 11:48:59 +00:00
LibWebView+RequestServer: Add some UI for DNS settings
This commit is contained in:
parent
e1369aa7d6
commit
2c13504bfc
Notes:
github-actions[bot]
2025-04-22 22:06:21 +00:00
Author: https://github.com/alimpfard
Commit: 2c13504bfc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4278
Reviewed-by: https://github.com/trflynn89 ✅
12 changed files with 284 additions and 14 deletions
|
@ -376,6 +376,13 @@ void ConnectionFromClient::set_dns_server(ByteString host_or_address, u16 port,
|
|||
default_resolver()->dns.reset_connection();
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_use_system_dns()
|
||||
{
|
||||
g_dns_info.server_hostname = {};
|
||||
g_dns_info.server_address = {};
|
||||
default_resolver()->dns.reset_connection();
|
||||
}
|
||||
|
||||
#ifdef AK_OS_WINDOWS
|
||||
void ConnectionFromClient::start_request(i32, ByteString, URL::URL, HTTP::HeaderMap, ByteBuffer, Core::ProxyData)
|
||||
{
|
||||
|
|
|
@ -41,6 +41,7 @@ private:
|
|||
virtual Messages::RequestServer::ConnectNewClientResponse connect_new_client() override;
|
||||
virtual Messages::RequestServer::IsSupportedProtocolResponse is_supported_protocol(ByteString) override;
|
||||
virtual void set_dns_server(ByteString host_or_address, u16 port, bool use_tls) override;
|
||||
virtual void set_use_system_dns() override;
|
||||
virtual void start_request(i32 request_id, ByteString, URL::URL, HTTP::HeaderMap, ByteBuffer, Core::ProxyData) override;
|
||||
virtual Messages::RequestServer::StopRequestResponse stop_request(i32) override;
|
||||
virtual Messages::RequestServer::SetCertificateResponse set_certificate(i32, ByteString, ByteString) override;
|
||||
|
|
|
@ -10,6 +10,7 @@ endpoint RequestServer
|
|||
|
||||
// use_tls: enable DNS over TLS
|
||||
set_dns_server(ByteString host_or_address, u16 port, bool use_tls) =|
|
||||
set_use_system_dns() =|
|
||||
|
||||
// Test if a specific protocol is supported, e.g "http"
|
||||
is_supported_protocol(ByteString protocol) => (bool supported)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue