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: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- run: pip install -e .[dev] - run: pip install -e .[dev]
- run: pytest --cov=savdoh --cov-report=xml - run: pytest --cov=pydoh --cov-report=xml
- uses: codecov/codecov-action@v4 - uses: codecov/codecov-action@v4
if: matrix.python-version == '3.12' if: matrix.python-version == '3.12'
with: 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) [![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/savdoh/branch/master/graph/badge.svg)](https://codecov.io/gh/ImSavsis/savdoh) [![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/savdoh.svg)](https://pypi.org/project/savdoh/) [![pypi](https://img.shields.io/pypi/v/pydoh.svg)](https://pypi.org/project/pydoh/)
[![downloads](https://img.shields.io/pypi/dm/savdoh.svg)](https://pypi.org/project/savdoh/) [![downloads](https://img.shields.io/pypi/dm/pydoh.svg)](https://pypi.org/project/pydoh/)
[![versions](https://img.shields.io/pypi/pyversions/savdoh.svg)](https://pypi.org/project/savdoh/) [![versions](https://img.shields.io/pypi/pyversions/pydoh.svg)](https://pypi.org/project/pydoh/)
[![license](https://img.shields.io/github/license/ImSavsis/savdoh.svg)](https://github.com/ImSavsis/savdoh/blob/master/LICENSE) [![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-запросы. DNS-over-HTTPS резолвер для питона. ноль зависимостей — весь HTTPS через стандартный `http.client`+`ssl`. провайдер/DPI видит только твой HTTPS к cloudflare, а не голые DNS-запросы.
```mermaid ```mermaid
sequenceDiagram sequenceDiagram
App->>savdoh: resolve("example.com") App->>pydoh: resolve("example.com")
savdoh->>Cloudflare: DNS-запрос внутри HTTPS POST pydoh->>Cloudflare: DNS-запрос внутри HTTPS POST
Cloudflare-->>savdoh: ответ внутри HTTPS Cloudflare-->>pydoh: ответ внутри HTTPS
savdoh-->>App: ["93.184.216.34"] pydoh-->>App: ["93.184.216.34"]
``` ```
## установка ## установка
``` ```
pip install savdoh pip install pydoh
``` ```
## юзать ## юзать
```python ```python
import savdoh import pydoh
ips = savdoh.resolve("example.com") ips = pydoh.resolve("example.com")
``` ```
или подменить резолвинг вообще везде в питоне одной строкой — `requests`, `aiohttp`, что угодно на сокетах будет резолвить через DoH: или подменить резолвинг вообще везде в питоне одной строкой — `requests`, `aiohttp`, что угодно на сокетах будет резолвить через DoH:
```python ```python
import savdoh import pydoh
savdoh.patch_socket() 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. > 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 ## Docs
- [README](https://github.com/ImSavsis/savdoh/blob/master/README.md): install, usage, feature list - [README](https://github.com/ImSavsis/pydoh/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/pydoh/resolver.py](https://github.com/ImSavsis/pydoh/blob/master/src/pydoh/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/pydoh/patch.py](https://github.com/ImSavsis/pydoh/blob/master/src/pydoh/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 - [src/pydoh/wire.py](https://github.com/ImSavsis/pydoh/blob/master/src/pydoh/wire.py): minimal DNS wire format encode/decode
## Notes ## Notes

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
import socket 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(): def test_patch_and_unpatch_restores_original():

View file

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

View file

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