All Projects â†’ ZhukovAlexander â†’ aio-doh

ZhukovAlexander / aio-doh

Licence: Apache-2.0 license
Asynchronous DNS-over-HTTPS client for Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to aio-doh

flareon
🦊A cloudflare DNS over HTTPs resolver client library.
Stars: ✭ 14 (+0%)
Mutual labels:  https, dns-over-https
dohjs
DNS over HTTPS client for use in the browser
Stars: ✭ 71 (+407.14%)
Mutual labels:  https, dns-over-https
Criollo
A powerful Cocoa web framework and HTTP server for macOS, iOS and tvOS.
Stars: ✭ 229 (+1535.71%)
Mutual labels:  https
go-doh-client
A DNS over HTTPS client implementation written in Go
Stars: ✭ 45 (+221.43%)
Mutual labels:  dns-over-https
networker
🔧 A simple CLI tool for various networking operations
Stars: ✭ 20 (+42.86%)
Mutual labels:  https
Chrome Developer Mode Extension Warning Patcher
⇒ Disable Chrome's Developer Mode Extension Warning Popup & Elision WWW/HTTPS Hiding & Debugging Extension Popup
Stars: ✭ 240 (+1614.29%)
Mutual labels:  https
ansible-cloudflared
Install cloudflared and systemd service for DNS-Over-HTTPS
Stars: ✭ 18 (+28.57%)
Mutual labels:  dns-over-https
Aws S3 Proxy
Reverse proxy for AWS S3 with basic authentication.
Stars: ✭ 227 (+1521.43%)
Mutual labels:  https
hurl
http(s)+h2 server load tester
Stars: ✭ 143 (+921.43%)
Mutual labels:  https
node-http-client
🔌 A light-weight, performant, composable blueprint for writing consistent and re-usable Node.js HTTP clients
Stars: ✭ 21 (+50%)
Mutual labels:  https
Kvantum
An intellectual (HTTP/HTTPS) web server with support for server side templating (Crush, Apache Velocity and JTwig)
Stars: ✭ 17 (+21.43%)
Mutual labels:  https
docker-ssl-reverse-proxy
Easy-to-use auto-SSL reverse proxy as a Docker container based on Caddy and Let’s Encrypt
Stars: ✭ 22 (+57.14%)
Mutual labels:  https
Fire
🔥A delightful HTTP/HTTPS networking framework for iOS/macOS/watchOS/tvOS platforms written in Swift.
Stars: ✭ 243 (+1635.71%)
Mutual labels:  https
WormholyForObjectiveC
Network debugging made easy,This network debugging tool is developed based on the swift version of Wormholy.
Stars: ✭ 21 (+50%)
Mutual labels:  https
Chameleon
Customizable honeypots for monitoring network traffic, bots activities and username\password credentials (DNS, HTTP Proxy, HTTP, HTTPS, SSH, POP3, IMAP, STMP, RDP, VNC, SMB, SOCKS5, Redis, TELNET, Postgres and MySQL)
Stars: ✭ 230 (+1542.86%)
Mutual labels:  https
react-redux-passport-uikit-express-boiler
A React+Redux boilerplate using Express as backend, UIKit for frontend, MongoDB for storage & Passport for auth.
Stars: ✭ 59 (+321.43%)
Mutual labels:  https
Beasthttp
Provides helper tools for creating RESTful services using Boost.Beast
Stars: ✭ 227 (+1521.43%)
Mutual labels:  https
https-aspnetcore-in-docker
ASP.NET Core app on HTTPS in Docker
Stars: ✭ 24 (+71.43%)
Mutual labels:  https
RB-libcURL
A Realbasic and Xojo binding to libcurl
Stars: ✭ 19 (+35.71%)
Mutual labels:  https
dcompass
A high-performance programmable DNS component aiming at robustness, speed, and flexibility
Stars: ✭ 260 (+1757.14%)
Mutual labels:  dns-over-https
https://travis-ci.org/ZhukovAlexander/aio-doh.svg?branch=master

D'oh!

aio-doh is a tiny asynchronous client for Google's Public DNS-over-HTTPS (DOH) service. Main advanteges of DOH is increased security due to DNSSEC and also speed, reliability and performance gains. The library is built on top of asyncio and aiohttp.

Installation

pip install aio-doh

Example usage

>>> from doh import DOHClient
>>> from asyncio import get_event_loop
>>>
>>> loop = get_event_loop()
>>> client = DOHClient(loop)
>>>
>>> loop.run_until_complete(client.resolve('example.com'))
['93.184.216.34']
>>>
>>> from pprint import pprint as pp
>>> pp(loop.run_until_complete(client.query('example.com', type='AAAA'))) # doctest:+ELLIPSIS
{'AD': True,
 'Additional': [],
 'Answer': [{'TTL': ...,
             'data': '2606:2800:220:1:248:1893:25c8:1946',
             'name': 'example.com.',
             'type': 28}],
 'CD': False,
 'Question': [{'name': 'example.com.', 'type': 28}],
 'RA': True,
 'RD': True,
 'Status': 0,
 'TC': False,
 'edns_client_subnet': '0.0.0.0/0'}
>>>

API

The API is simple and small:

  • DOHClient.query(hostname, type, dnssec)
    Params:
    hostname - name of a target host; type - DNS record type for a query; dnssec - enable DNSSEC validation.
    Returns:
    Complete DNS response as a python dictionary.
  • DOHClient.resolve(hostname, type, dnssec)
    Params:
    hostname - name of a target host; type - DNS record type for a query; dnssec - enable DNSSEC validation.
    Returns:
    List of IP adresses.
  • DOHClient.gethostbyname(hostname, type, dnssec)
    Params:
    hostname - name of a target host; type - DNS record type for a query; dnssec - enable DNSSEC validation.
    Returns:
    First IP adress found if any or raises an error.

Documentation

TODO

Contributing

File an issue or create a pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].