aiodnsprox is a DNS proxy based on Python's asyncio. It supports a variety of different DNS transports on both the serving side and the proxied side. On the proxied side, classic DNS protocols are supported, such as
- DNS over UDP (RFC 1035, section 4.2.1) and
- DNS over TCP (RFC 1035, section 4.2.2).
On the serving side, DNS over UDP is supported as well but in addition the following are supported:
- DNS over DTLS (RFC 8094)
- DNS over CoAP (DoC, draft-ietf-core-dns-over-coap), supporting both unencrypted transfer and CoAP over DTLS.
Since aiodnsprox currently is using an experimental feature branch of aiocoap that provides CoAP over DTLS server support, aiodnsprox is to be considered in an early beta state.
Releases can be installed from PyPI
pip install aiodnsproxYou can install the latest development version directly from GitHub
pip install git+https://github.com/netd-tud/aiodnsprox/aiodnsprox works on Python 3.7 or newer.
The following packages are required (see requirements.txt):
To parse configuration files PyYAML 5.4 or newer is used.
For proxying upstream DNS services and message parsing, dnspython 2.1 or
newer is used.
For serving DTLS messages, the tinydtls-based DTLSSocket 0.1 or newer is
used.
For serving CoAP, an experimental branch
of aiocoap with linkheader, tinydtls, and oscore support is used.
The branch is based on aiocoap 0.4.1.
To start e.g. a DNS over UDP proxy towards a public DNS over UDP server of OpenNIC, use
aiodns-proxy -u -U 185.120.22.15For more information on the provided arguments, see
aiodns-proxy -hCode contributions to aiodnsprox can be made in our Github repository. Development there follows the PEP8 recommendations and general best practices as best as possible.
Bugs and feature requests can be made in the issue tracker over at Github.
Our documentation is built with sphinx.
For testing we try to achieve as much coverage as possible with our tests found in the tests directory and utilize pytest. The easiest way to run the whole test suite is via the tox tool. Just run
tox