zero-dependency DNS over HTTPS resolver for Python, with an optional socket.getaddrinfo patch
Project description
pydoh
DNS-over-HTTPS резолвер для питона. ноль зависимостей — весь HTTPS через стандартный http.client+ssl. провайдер/DPI видит только твой HTTPS к cloudflare, а не голые DNS-запросы.
sequenceDiagram
App->>pydoh: resolve("example.com")
pydoh->>Cloudflare: DNS-запрос внутри HTTPS POST
Cloudflare-->>pydoh: ответ внутри HTTPS
pydoh-->>App: ["93.184.216.34"]
установка
pip install pydoh
юзать
import pydoh
ips = pydoh.resolve("example.com")
или подменить резолвинг вообще везде в питоне одной строкой — requests, aiohttp, что угодно на сокетах будет резолвить через DoH:
import pydoh
pydoh.patch_socket()
фичи
- zero deps, только stdlib
- fallback между cloudflare / google / quad9 если один упал
- кэш по TTL из ответа
- typed (py.typed), питон 3.10–3.13
что не умеет
не проверяет DNSSEC, не поддерживает TCP-фрагментированные DNS-ответы больше одного UDP-пакета.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydoh-0.1.0.tar.gz.
File metadata
- Download URL: pydoh-0.1.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5138e9cae50cc36ed413ca195d35eb3064b94ad7b5a77188c0dc738180dc46ac
|
|
| MD5 |
73fb4693903c1764fe576f1b666bab25
|
|
| BLAKE2b-256 |
306d92edd259cbbd12249e19dcdfdb349b0bb7d40737cc948d42bda5e4a51b22
|
Provenance
The following attestation bundles were made for pydoh-0.1.0.tar.gz:
Publisher:
publish.yml on ImSavsis/pydoh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydoh-0.1.0.tar.gz -
Subject digest:
5138e9cae50cc36ed413ca195d35eb3064b94ad7b5a77188c0dc738180dc46ac - Sigstore transparency entry: 2202035883
- Sigstore integration time:
-
Permalink:
ImSavsis/pydoh@2c1e4617cf0201122a008adc41983015cc804d4d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ImSavsis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2c1e4617cf0201122a008adc41983015cc804d4d -
Trigger Event:
release
-
Statement type:
File details
Details for the file pydoh-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pydoh-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5b05e49465b3aa6ac425fa80ed927b2963fecca5bde0cbcf2aa0830d6dc0289
|
|
| MD5 |
dc83f839e322da2601eeb08cad06c9d1
|
|
| BLAKE2b-256 |
446c6a0363ad6ad887d24b52d9f7b4dacd34e79158f6d82a089c63fb5bc94e14
|
Provenance
The following attestation bundles were made for pydoh-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ImSavsis/pydoh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydoh-0.1.0-py3-none-any.whl -
Subject digest:
d5b05e49465b3aa6ac425fa80ed927b2963fecca5bde0cbcf2aa0830d6dc0289 - Sigstore transparency entry: 2202035918
- Sigstore integration time:
-
Permalink:
ImSavsis/pydoh@2c1e4617cf0201122a008adc41983015cc804d4d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ImSavsis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2c1e4617cf0201122a008adc41983015cc804d4d -
Trigger Event:
release
-
Statement type: