DEVELOPMENT ENVIRONMENT

~liljamo/felu-ng

ref: 19b891163d1a18c6947fb3353fcfb04bfc0f9319 felu-ng/felu-ns/README.md -rw-r--r-- 1.5 KiB
19b89116Jonni Liljamo docs: split docs to crate READMEs and more planning a day ago
                                                                                
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# felu-ns
Nameserver.

Many, hosted as ns1, ns2, nsN, ns9.

Requires a static public IPv4, which is used as the DNS (At least Do53 (Port 53
over UDP and TCP). Possibly DoT, DoH and DoQ in the future) interface.

Optionally the same interface used for DNS can be used as the interface that
felu-mgmt connects to for management.
Though ideally management is done via a VPN connection (e.g. Tailscale) and not
via a public interface.

Completely stateless, receives configuration from felu-mgmt and stores it in
memory. Stores nothing to disk.

Built-in HTTP server for things like Prometheus metrics at /metrics.

## Todo development notes
* Don't start DNS servers until configuration from felu-mgmt is received.
* Stress testing, I have no clue how performant the initial actor implementation
will be.

## Architecture
### State Actor
Stores nameserver state/configuration.

### MgmtServer Actor
Tokio TcpListener on management port.

Sends configuration updates to state actor.

### DoUT Actor
DNS over UDP and TCP.

Reads records from state actor when responding to queries.

## CLI

[//]: # (The output of `just ns --help`)
```
Usage: felu-ns [OPTIONS]

Options:
      --mgmt-port <MGMT_PORT>  Port for management [default: 54321]
      --udp-port <UDP_PORT>    Override DNS over UDP port [default: 53]
      --tcp-port <TCP_PORT>    Override DNS over TCP port [default: 53]
  -h, --help
```
## Dependencies
* [hickory-dns](https://github.com/hickory-dns/hickory-dns) as the DNS library, should support everything needed
* [hyper](https://github.com/hyperium/hyper) for HTTP server