-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdnresd.txt
More file actions
25 lines (18 loc) · 1.03 KB
/
dnresd.txt
File metadata and controls
25 lines (18 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
DNS resolver daemon. Mostly to move gethostbyname out of libc.
Listens for requests on /run/dns, does DNS stuff, replies back.
With this in place, gethostbyname() should devolve into a simple
socket-connect-send-recv sequence, with little to no parsing and
definitely no config reading and such.
Configuration: unclear. All things considered, it would be great
to have some sort of zero-config, so root queries, so probably not
that good. Lacking that, something really static like 8.8.8.8, but
again that's Google so not good either. Querying 192.168.1.1 in home
network should be an option too.
Relying on DHCP is tricky. Including the question on whether to rely
on DHCP-supplied data at all.
References: musl gethostbyname
Alternative approach: a service that would take a hostname and return
an open socket fd. This would make it relatively easy to handle transport
protocols including TLS and TOR in a sane way from the application
perspective, but it is not clear whether all necessary tools can be
re-implemented to use such a service.