mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-12 17:37:53 +03:00
LookupServer: Rename setting "DNS/IPAddress" => "DNS/Nameserver"
This commit is contained in:
parent
0c544052a5
commit
c26560ec26
Notes:
sideshowbarker
2024-07-19 09:48:16 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c26560ec266
@ -1,2 +1,2 @@
|
||||
[DNS]
|
||||
IPAddress=1.1.1.1
|
||||
Nameserver=1.1.1.1
|
||||
|
@ -43,7 +43,7 @@ LookupServer::LookupServer()
|
||||
{
|
||||
auto config = CConfigFile::get_for_system("LookupServer");
|
||||
dbg() << "Using network config file at " << config->file_name();
|
||||
m_dns_ip = config->read_entry("DNS", "IPAddress", "127.0.0.53");
|
||||
m_nameserver = config->read_entry("DNS", "Nameserver", "1.1.1.1");
|
||||
|
||||
load_etc_hosts();
|
||||
|
||||
@ -114,7 +114,7 @@ void LookupServer::service_client(RefPtr<CLocalSocket> socket)
|
||||
return;
|
||||
}
|
||||
auto hostname = String((const char*)client_buffer + 1, nrecv - 1, Chomp);
|
||||
dbg() << "Got request for '" << hostname << "' (using IP " << m_dns_ip << ")";
|
||||
dbg() << "Got request for '" << hostname << "' (using IP " << m_nameserver << ")";
|
||||
|
||||
Vector<String> responses;
|
||||
|
||||
@ -182,7 +182,7 @@ Vector<String> LookupServer::lookup(const String& hostname, bool& did_timeout, u
|
||||
return {};
|
||||
}
|
||||
|
||||
if (!udp_socket->connect(m_dns_ip, 53))
|
||||
if (!udp_socket->connect(m_nameserver, 53))
|
||||
return {};
|
||||
|
||||
if (!udp_socket->write(buffer))
|
||||
|
@ -51,7 +51,7 @@ private:
|
||||
};
|
||||
|
||||
RefPtr<CLocalServer> m_local_server;
|
||||
String m_dns_ip;
|
||||
String m_nameserver;
|
||||
HashMap<String, String> m_dns_custom_hostnames;
|
||||
HashMap<String, CachedLookup> m_lookup_cache;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user