DNS over HTTPS resolver for python requests using dnspython module
- Resolve hosts using public DNS servers or custom DNS servers over HTTPS
- DNS caching, making faster to resolve hosts
- Easy to use
You must have Python 3.8.x or up with Pip installed.
# For Linux / Mac OS
python3 -m pip install requests-doh
# For Windows
py -3 -m pip install requests-doh
git clone https://github.com/mansuf/requests-doh.git
cd requests-doh
python setup.py install
For more information about installation, see Installation
# for convenience
from requests_doh import DNSOverHTTPSSession
# By default, DoH provider will set to `cloudflare`
session = DNSOverHTTPSSession(provider='google')
r = session.get('https://google.com')
print(r.content)
For more information about usage, see API usage
See LICENSE