DNS over HTTPS based on aiohttp and async_dns
Project description
async-doh
DNS over HTTPS based on aiohttp and async_dns.
Installation
$ pip install async-doh
Usage
Client
import asyncio
from async_doh.client import query
async def main():
result = await query('https://1.1.1.1/dns-query', 'www.google.com', 'A')
print('query:', result)
result = await query_json('https://1.1.1.1/dns-query', 'www.google.com', 'A')
print('query_json:', result)
asyncio.run(main())
Server
from aiohttp import web
from async_doh.server import application
web.run(application)
Now you have http://localhost:8080/dns-query
as an endpoint.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
async-doh-0.1.0.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for async_doh-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c8739a25ed35a55c56f25e597be266ae994510518cba9eb3fba0304e1cc226f |
|
MD5 | 0ea29c39afa541f1ea498a29a3b75581 |
|
BLAKE2b-256 | 3da88344284de7119043786032def9749dbcf2b67ca63f9df02bebfef6b109f9 |