Cuong Manh Le
997ec342e0
cmd/ctrld,internal/dns: support systemd-networkd dbus
...
For interface managed by systemd-networkd, systemd-resolved can not
reset DNS. To fix this, attempting to check before the run loop and set
the suitable manager for the system.
Updates #55
2023-02-27 20:13:44 +07:00
Cuong Manh Le
e385547461
internal/net: fix wrong address when testing network up
2023-02-27 20:13:44 +07:00
Cuong Manh Le
83b551fb2d
internal/controld: check if ipv4 is available before connect to API
...
Updates #53
2023-02-27 20:13:42 +07:00
Cuong Manh Le
45f827a2c5
internal/controld: connect to API using ipv4 only
...
Connecting to API using ipv6 sometimes hang at TLS handshake, using ipv4
only so we can fetch the config more reliably.
Fixed #53
2023-02-27 19:54:52 +07:00
Cuong Manh Le
851f9b9742
all: fork tailscale Linux dns manager package
...
With modification to fit our use case.
2023-02-03 02:47:31 +07:00
Cuong Manh Le
4ea1e64795
all: make cache scope to upstream
2023-02-01 23:11:32 +07:00
Cuong Manh Le
1186963531
all: use controld dialer for probing network
2023-01-23 14:06:43 +07:00
Cuong Manh Le
837563dcd5
all: wait for network up before running
...
If ctrld setup the interface correctly, the interface DNS is set to
ctrld listener address. At boot time, the ctrld is not up yet, so it
would break the processing Control D config fetching.
Fixing this by waiting for network up before doing the query.
2023-01-23 00:48:33 +07:00
Cuong Manh Le
46965b04b4
internal/resolvconffile: add build tag for test file
2023-01-21 01:14:03 +07:00
Cuong Manh Le
b00a7c34ee
cmd/ctrld: add --iface for setting DNS on specific interface
2023-01-20 21:43:03 +07:00
Cuong Manh Le
53306235dc
all: uninstall service if got invalid config from API
2023-01-20 21:37:44 +07:00
Cuong Manh Le
9f90811567
cmd/ctrld: update config when "--cd" present
2023-01-20 21:37:24 +07:00
Cuong Manh Le
3014556f2d
cmd/ctrld,internal/controld: do not set bootstrap IP
2023-01-20 21:36:56 +07:00
Cuong Manh Le
114ef9aad6
all: add starting service with Control D config
2023-01-20 21:33:38 +07:00
Cuong Manh Le
30fefe7ab9
all: add local caching
...
This commit adds config params to enable local DNS response caching and
control its behavior, allow tweaking the cache size, ttl override and
serving stale response.
2023-01-20 21:33:01 +07:00
Cuong Manh Le
ccada70e31
all: implement policy failover rcodes
...
While at it, ensure that config is validated, and fixing a bug related
to reuse ctx between multiple upstreams resolving.
2022-12-14 23:34:24 +07:00