diff --git a/CHANGELOG b/CHANGELOG index c9cf710..274adff 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +Version 0.4.1 + +* Add support for HTTPS RR + Version 0.4 * Ported to Python 3.6+ diff --git a/README b/README index e3db5ec..b814bea 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ _ _ __ - | | version 0.4 | | / _| + | | version 0.4.1| | / _| __| |_ __ ___ ___| |__ ___| |_ / _` | '_ \/ __|/ __| '_ \ / _ \ _| | (_| | | | \__ \ (__| | | | __/ | diff --git a/dnschef.ini b/dnschef.ini index 5004c60..ccc7edd 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 diff --git a/dnschef.py b/dnschef.py index c57924d..a06d258 100755 --- a/dnschef.py +++ b/dnschef.py @@ -6,7 +6,7 @@ # for the latest version and documentation. Please forward all issues and # concerns to iphelix [at] thesprawl.org. -DNSCHEF_VERSION = "0.4" +DNSCHEF_VERSION = "0.4.1" # Copyright (C) 2019 Peter Kacherginsky, Marcello Salvati # All rights reserved. @@ -183,6 +183,11 @@ def parse(self, data): response.add_answer(RR(qname, getattr(QTYPE,qtype), rdata=RDMAP[qtype](covered, algorithm, labels,orig_ttl, sig_exp, sig_inc, key_tag, name, sig) )) + elif qtype == "HTTPS": + kv_pairs = fake_record.split(" ") + mydata = RDMAP[qtype].fromZone(kv_pairs) + response.add_answer(RR(qname, getattr(QTYPE,qtype), rdata=mydata)) + else: # dnslib doesn't like trailing dots if fake_record[-1] == ".": fake_record = fake_record[:-1] diff --git a/requirements.txt b/requirements.txt index 4654a19..2eb85cb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -i https://pypi.org/simple -dnslib==0.9.10 +dnslib==0.9.23