diff --git a/dnschef.ini b/dnschef.ini index 5004c60..b94c806 100644 --- a/dnschef.ini +++ b/dnschef.ini @@ -37,4 +37,8 @@ [RRSIG] ; FORMAT: covered algorithm labels labels orig_ttl sig_exp sig_inc key_tag name base64(sig) -*.thesprawl.org=A 5 3 86400 20030322173103 20030220173103 2642 thesprawl.org. oJB1W6WNGv+ldvQ3WDG0MQkg5IEhjRip8WTrPYGv07h108dUKGMeDPKijVCHX3DDKdfb+v6oB9wfuh3DTJXUAfI/M0zmO/zz8bW0Rznl8O3tGNazPwQKkRN20XPXV6nwwfoXmJQbsLNrLfkGJ5D6fwFm8nN+6pBzeDQfsS3Ap3o= \ No newline at end of file +*.thesprawl.org=A 5 3 86400 20030322173103 20030220173103 2642 thesprawl.org. oJB1W6WNGv+ldvQ3WDG0MQkg5IEhjRip8WTrPYGv07h108dUKGMeDPKijVCHX3DDKdfb+v6oB9wfuh3DTJXUAfI/M0zmO/zz8bW0Rznl8O3tGNazPwQKkRN20XPXV6nwwfoXmJQbsLNrLfkGJ5D6fwFm8nN+6pBzeDQfsS3Ap3o= + +[HTTPS] +;format: priority target key=value pairs +*.thesprawl.org=1 . alpn=h2 ipv4hint=127.0.0.1 ipv6hint=::1 \ No newline at end of file diff --git a/dnschef/kitchen.py b/dnschef/kitchen.py index ab54daf..418d1e0 100644 --- a/dnschef/kitchen.py +++ b/dnschef/kitchen.py @@ -28,6 +28,11 @@ async def do_AAAA(self, addr, record, qname, qtype): ipv6_hex_tuple = list(map(int, ip_address(record).packed)) return RR(qname, getattr(QTYPE, qtype), rdata=RDMAP[qtype](ipv6_hex_tuple)) + async def do_HTTPS(self, addr, record, qname, qtype): + kv_pairs = record.split(" ") + mydata = RDMAP[qtype].fromZone(kv_pairs) + return RR(qname, getattr(QTYPE, qtype), rdata=mydata) + async def do_SOA(self, addr, record, qname, qtype): mname, rname, t1, t2, t3, t4, t5 = record.split(" ") times = tuple([int(t) for t in [t1, t2, t3, t4, t5]]) diff --git a/pyproject.toml b/pyproject.toml index 64da88d..72f80a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ structlog = "^23.1.0" [tool.poetry.scripts] dnschef = 'dnschef.__main__:main' +dnschef-ng = 'dnschef.__main__:main' [tool.poetry.group.api.dependencies] fastapi = "^0.103.1"