revert: back to pydoh name

This commit is contained in:
ImSavsis 2026-07-19 20:51:04 +05:00
parent 9b9518ed27
commit 2c1e4617cf
16 changed files with 32 additions and 32 deletions

View file

@ -16,7 +16,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e .[dev]
- run: pytest --cov=savdoh --cov-report=xml
- run: pytest --cov=pydoh --cov-report=xml
- uses: codecov/codecov-action@v4
if: matrix.python-version == '3.12'
with:

View file

@ -1,41 +1,41 @@
# savdoh
# pydoh
[![CI](https://github.com/ImSavsis/savdoh/actions/workflows/ci.yml/badge.svg)](https://github.com/ImSavsis/savdoh/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/ImSavsis/savdoh/branch/master/graph/badge.svg)](https://codecov.io/gh/ImSavsis/savdoh)
[![pypi](https://img.shields.io/pypi/v/savdoh.svg)](https://pypi.org/project/savdoh/)
[![downloads](https://img.shields.io/pypi/dm/savdoh.svg)](https://pypi.org/project/savdoh/)
[![versions](https://img.shields.io/pypi/pyversions/savdoh.svg)](https://pypi.org/project/savdoh/)
[![license](https://img.shields.io/github/license/ImSavsis/savdoh.svg)](https://github.com/ImSavsis/savdoh/blob/master/LICENSE)
[![CI](https://github.com/ImSavsis/pydoh/actions/workflows/ci.yml/badge.svg)](https://github.com/ImSavsis/pydoh/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/ImSavsis/pydoh/branch/master/graph/badge.svg)](https://codecov.io/gh/ImSavsis/pydoh)
[![pypi](https://img.shields.io/pypi/v/pydoh.svg)](https://pypi.org/project/pydoh/)
[![downloads](https://img.shields.io/pypi/dm/pydoh.svg)](https://pypi.org/project/pydoh/)
[![versions](https://img.shields.io/pypi/pyversions/pydoh.svg)](https://pypi.org/project/pydoh/)
[![license](https://img.shields.io/github/license/ImSavsis/pydoh.svg)](https://github.com/ImSavsis/pydoh/blob/master/LICENSE)
DNS-over-HTTPS резолвер для питона. ноль зависимостей — весь HTTPS через стандартный `http.client`+`ssl`. провайдер/DPI видит только твой HTTPS к cloudflare, а не голые DNS-запросы.
```mermaid
sequenceDiagram
App->>savdoh: resolve("example.com")
savdoh->>Cloudflare: DNS-запрос внутри HTTPS POST
Cloudflare-->>savdoh: ответ внутри HTTPS
savdoh-->>App: ["93.184.216.34"]
App->>pydoh: resolve("example.com")
pydoh->>Cloudflare: DNS-запрос внутри HTTPS POST
Cloudflare-->>pydoh: ответ внутри HTTPS
pydoh-->>App: ["93.184.216.34"]
```
## установка
```
pip install savdoh
pip install pydoh
```
## юзать
```python
import savdoh
import pydoh
ips = savdoh.resolve("example.com")
ips = pydoh.resolve("example.com")
```
или подменить резолвинг вообще везде в питоне одной строкой — `requests`, `aiohttp`, что угодно на сокетах будет резолвить через DoH:
```python
import savdoh
savdoh.patch_socket()
import pydoh
pydoh.patch_socket()
```
## фичи

View file

@ -1,4 +1,4 @@
# savdoh
# pydoh
> Zero-dependency DNS-over-HTTPS resolver for Python. Ships a simple resolve() function and an optional socket.getaddrinfo patch that makes any existing Python networking code (requests, aiohttp, anything on sockets) resolve over DoH transparently.
@ -6,10 +6,10 @@ Pure standard library, uses http.client and ssl for the HTTPS leg. Falls back ac
## Docs
- [README](https://github.com/ImSavsis/savdoh/blob/master/README.md): install, usage, feature list
- [src/savdoh/resolver.py](https://github.com/ImSavsis/savdoh/blob/master/src/savdoh/resolver.py): core resolve logic with provider fallback and caching
- [src/savdoh/patch.py](https://github.com/ImSavsis/savdoh/blob/master/src/savdoh/patch.py): socket.getaddrinfo monkeypatch
- [src/savdoh/wire.py](https://github.com/ImSavsis/savdoh/blob/master/src/savdoh/wire.py): minimal DNS wire format encode/decode
- [README](https://github.com/ImSavsis/pydoh/blob/master/README.md): install, usage, feature list
- [src/pydoh/resolver.py](https://github.com/ImSavsis/pydoh/blob/master/src/pydoh/resolver.py): core resolve logic with provider fallback and caching
- [src/pydoh/patch.py](https://github.com/ImSavsis/pydoh/blob/master/src/pydoh/patch.py): socket.getaddrinfo monkeypatch
- [src/pydoh/wire.py](https://github.com/ImSavsis/pydoh/blob/master/src/pydoh/wire.py): minimal DNS wire format encode/decode
## Notes

View file

@ -3,7 +3,7 @@ requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "savdoh"
name = "pydoh"
version = "0.1.0"
description = "zero-dependency DNS over HTTPS resolver for Python, with an optional socket.getaddrinfo patch"
readme = "README.md"
@ -23,11 +23,11 @@ classifiers = [
]
[project.urls]
Homepage = "https://github.com/ImSavsis/savdoh"
Issues = "https://github.com/ImSavsis/savdoh/issues"
Homepage = "https://github.com/ImSavsis/pydoh"
Issues = "https://github.com/ImSavsis/pydoh/issues"
[project.optional-dependencies]
dev = ["pytest", "pytest-cov", "build", "twine"]
[tool.hatch.build.targets.wheel]
packages = ["src/savdoh"]
packages = ["src/pydoh"]

View file

@ -1,6 +1,6 @@
import time
from savdoh.cache import TTLCache
from pydoh.cache import TTLCache
def test_cache_hit():

View file

@ -1,4 +1,4 @@
from savdoh import resolve
from pydoh import resolve
def test_live_resolve_example_com():

View file

@ -1,6 +1,6 @@
import socket
from savdoh.patch import patch_socket, unpatch_socket
from pydoh.patch import patch_socket, unpatch_socket
def test_patch_and_unpatch_restores_original():

View file

@ -1,7 +1,7 @@
import struct
import savdoh.resolver as resolver_module
from savdoh.resolver import ResolveError, resolve
import pydoh.resolver as resolver_module
from pydoh.resolver import ResolveError, resolve
def _make_response(query_id, ip):

View file

@ -1,6 +1,6 @@
import struct
from savdoh.wire import build_query, parse_response
from pydoh.wire import build_query, parse_response
def test_build_query_shape():