mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
LookupServer: Rename setting "DNS/IPAddress" => "DNS/Nameserver"
This commit is contained in:
parent
0c544052a5
commit
c26560ec26
3 changed files with 5 additions and 5 deletions
|
@ -1,2 +1,2 @@
|
||||||
[DNS]
|
[DNS]
|
||||||
IPAddress=1.1.1.1
|
Nameserver=1.1.1.1
|
||||||
|
|
|
@ -43,7 +43,7 @@ LookupServer::LookupServer()
|
||||||
{
|
{
|
||||||
auto config = CConfigFile::get_for_system("LookupServer");
|
auto config = CConfigFile::get_for_system("LookupServer");
|
||||||
dbg() << "Using network config file at " << config->file_name();
|
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();
|
load_etc_hosts();
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ void LookupServer::service_client(RefPtr<CLocalSocket> socket)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto hostname = String((const char*)client_buffer + 1, nrecv - 1, Chomp);
|
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;
|
Vector<String> responses;
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ Vector<String> LookupServer::lookup(const String& hostname, bool& did_timeout, u
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!udp_socket->connect(m_dns_ip, 53))
|
if (!udp_socket->connect(m_nameserver, 53))
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
if (!udp_socket->write(buffer))
|
if (!udp_socket->write(buffer))
|
||||||
|
|
|
@ -51,7 +51,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
RefPtr<CLocalServer> m_local_server;
|
RefPtr<CLocalServer> m_local_server;
|
||||||
String m_dns_ip;
|
String m_nameserver;
|
||||||
HashMap<String, String> m_dns_custom_hostnames;
|
HashMap<String, String> m_dns_custom_hostnames;
|
||||||
HashMap<String, CachedLookup> m_lookup_cache;
|
HashMap<String, CachedLookup> m_lookup_cache;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue