Commit graph

27 commits

Author SHA1 Message Date
99a5e07224 move upstream project (https://github.com/itsxaos/stub) into subdir 2026-02-15 13:13:05 +01:00
xaos
e36782c04b doc: update README according to rewrite 2023-03-22 19:20:48 +01:00
xaos
d7c6d1fd39 fix: compare records as strings when deleting 2023-03-22 17:26:53 +01:00
xaos
759b725fdc style: format with go fmt 2023-03-22 16:27:57 +01:00
xaos
d25c1d24a7 test: add various tests for DNS Server/App 2023-03-22 16:24:53 +01:00
xaos
8e1ac34b27 chore: update go.mod & go.sum 2023-03-22 16:23:29 +01:00
xaos
15a4840b03 feat: implement (full) DNS server App, provider as ACMEDNSProvider
This is a rewrite of almost everything. The provided modules no longer
rely on undocumented/deprecated behavior.
It's no longer possible to have multiple DNS "servers" on different
sockets, but the new version allows serving arbitrary records. Records
can be defined in the config or Caddyfile.
The provider communicates with the Server via a channel.
2023-03-22 16:23:11 +01:00
xaos
a6d39a06aa feat: add function to log libdns.Records 2023-03-22 16:00:55 +01:00
xaos
46d64b2ca8 feat: improve logging & move into separate file 2023-03-22 15:45:14 +01:00
xaos
3ff826fd94 chore: add gitignore 2023-03-22 10:22:28 +01:00
xaos
71d1f19169 fix: remove hidden global state
dns.HandleFunc(".", handler) modifies the global dns.DefaultServeMux and
dns.Server uses that if it is initialized without a Handler. This would
cause issues when multiple instances of the module try to Present() at
the same time.
2023-02-28 13:20:04 +01:00
xaos
769d017d22 doc: add disclaimer 2023-02-27 12:54:49 +01:00
xaos
1934f703f4 chore: license 2023-02-27 11:19:26 +01:00
xaos
0dc18ac792 doc: add README 2023-02-27 10:52:58 +01:00
xaos
d28ad9ebaf style: simplify query handling some more 2023-02-27 04:22:04 +01:00
xaos
9e44cc2979 feat: switch to case-insensitive compare for domains
This also moves the domain check before the type check.

Domains need to be compared case-insensitively because resolvers will
send sarcastic queries for improved security, see here:
https://datatracker.ietf.org/doc/html/draft-vixie-dnsext-dns0x20-00

strings.EqualFold is maybe not perfectly correct because it does Unicode
case-folding and we only need ASCII.
2023-02-27 04:19:31 +01:00
xaos
a4c5671266 feat: refuse non-TXT records instead of sending NOTIMPL 2023-02-27 03:13:10 +01:00
xaos
0a768b5234 style: rework query handling 2023-02-27 03:10:47 +01:00
xaos
0c040f6376 chore: track go.sum 2023-02-25 11:23:44 +01:00
xaos
fcd18e5020 style: format with go fmt 2023-02-25 11:22:28 +01:00
xaos
cedf03550f feat: log DNS queries & replies 2023-02-25 11:19:22 +01:00
xaos
ae06278ec4 feat: add logging 2023-02-25 11:14:18 +01:00
xaos
f0c0cbc16b feat: add small check for ability to bind to address 2023-02-25 11:09:56 +01:00
xaos
225057c6e9 feat: implement DNS server 2023-02-25 10:49:47 +01:00
xaos
deaad3f695 feat: support Caddyfile 2023-02-25 10:34:04 +01:00
xaos
1e595f787c feat: define caddy module 2023-02-25 10:30:08 +01:00
xaos
1b01ff4079 chore: init 2023-02-25 10:21:30 +01:00