From 2c1e4617cf0201122a008adc41983015cc804d4d Mon Sep 17 00:00:00 2001 From: ImSavsis Date: Sun, 19 Jul 2026 20:51:04 +0500 Subject: [PATCH] revert: back to pydoh name --- .github/workflows/ci.yml | 2 +- README.md | 32 +++++++++++++++--------------- llms.txt | 10 +++++----- pyproject.toml | 8 ++++---- src/{savdoh => pydoh}/__init__.py | 0 src/{savdoh => pydoh}/cache.py | 0 src/{savdoh => pydoh}/patch.py | 0 src/{savdoh => pydoh}/providers.py | 0 src/{savdoh => pydoh}/py.typed | 0 src/{savdoh => pydoh}/resolver.py | 0 src/{savdoh => pydoh}/wire.py | 0 tests/test_cache.py | 2 +- tests/test_live.py | 2 +- tests/test_patch.py | 2 +- tests/test_resolver.py | 4 ++-- tests/test_wire.py | 2 +- 16 files changed, 32 insertions(+), 32 deletions(-) rename src/{savdoh => pydoh}/__init__.py (100%) rename src/{savdoh => pydoh}/cache.py (100%) rename src/{savdoh => pydoh}/patch.py (100%) rename src/{savdoh => pydoh}/providers.py (100%) rename src/{savdoh => pydoh}/py.typed (100%) rename src/{savdoh => pydoh}/resolver.py (100%) rename src/{savdoh => pydoh}/wire.py (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c91e180..3e7cc84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/README.md b/README.md index d670006..cec63cc 100644 --- a/README.md +++ b/README.md @@ -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() ``` ## фичи diff --git a/llms.txt b/llms.txt index 788b688..f5cec85 100644 --- a/llms.txt +++ b/llms.txt @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 6362b70..e1fad45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"] diff --git a/src/savdoh/__init__.py b/src/pydoh/__init__.py similarity index 100% rename from src/savdoh/__init__.py rename to src/pydoh/__init__.py diff --git a/src/savdoh/cache.py b/src/pydoh/cache.py similarity index 100% rename from src/savdoh/cache.py rename to src/pydoh/cache.py diff --git a/src/savdoh/patch.py b/src/pydoh/patch.py similarity index 100% rename from src/savdoh/patch.py rename to src/pydoh/patch.py diff --git a/src/savdoh/providers.py b/src/pydoh/providers.py similarity index 100% rename from src/savdoh/providers.py rename to src/pydoh/providers.py diff --git a/src/savdoh/py.typed b/src/pydoh/py.typed similarity index 100% rename from src/savdoh/py.typed rename to src/pydoh/py.typed diff --git a/src/savdoh/resolver.py b/src/pydoh/resolver.py similarity index 100% rename from src/savdoh/resolver.py rename to src/pydoh/resolver.py diff --git a/src/savdoh/wire.py b/src/pydoh/wire.py similarity index 100% rename from src/savdoh/wire.py rename to src/pydoh/wire.py diff --git a/tests/test_cache.py b/tests/test_cache.py index c86a68b..7eae268 100644 --- a/tests/test_cache.py +++ b/tests/test_cache.py @@ -1,6 +1,6 @@ import time -from savdoh.cache import TTLCache +from pydoh.cache import TTLCache def test_cache_hit(): diff --git a/tests/test_live.py b/tests/test_live.py index 1228aca..685a207 100644 --- a/tests/test_live.py +++ b/tests/test_live.py @@ -1,4 +1,4 @@ -from savdoh import resolve +from pydoh import resolve def test_live_resolve_example_com(): diff --git a/tests/test_patch.py b/tests/test_patch.py index 0cbbdac..09210d0 100644 --- a/tests/test_patch.py +++ b/tests/test_patch.py @@ -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(): diff --git a/tests/test_resolver.py b/tests/test_resolver.py index 5d7ce84..fd4e44f 100644 --- a/tests/test_resolver.py +++ b/tests/test_resolver.py @@ -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): diff --git a/tests/test_wire.py b/tests/test_wire.py index 78a57e1..26ce3c0 100644 --- a/tests/test_wire.py +++ b/tests/test_wire.py @@ -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():