rename: pydoh -> savdoh

This commit is contained in:
ImSavsis 2026-07-19 20:42:43 +05:00
parent 7348f9b0dd
commit ad45cc3e28
15 changed files with 21 additions and 20 deletions

View file

@ -10,6 +10,7 @@ permissions:
jobs:
publish:
runs-on: ubuntu-latest
environment: pypi
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

View file

@ -1,34 +1,34 @@
# pydoh
# savdoh
DNS-over-HTTPS резолвер для питона. ноль зависимостей — весь HTTPS через стандартный `http.client`+`ssl`. провайдер/DPI видит только твой HTTPS к cloudflare, а не голые DNS-запросы.
```mermaid
sequenceDiagram
App->>pydoh: resolve("example.com")
pydoh->>Cloudflare: DNS-запрос внутри HTTPS POST
Cloudflare-->>pydoh: ответ внутри HTTPS
pydoh-->>App: ["93.184.216.34"]
App->>savdoh: resolve("example.com")
savdoh->>Cloudflare: DNS-запрос внутри HTTPS POST
Cloudflare-->>savdoh: ответ внутри HTTPS
savdoh-->>App: ["93.184.216.34"]
```
## установка
```
pip install pydoh
pip install savdoh
```
## юзать
```python
import pydoh
import savdoh
ips = pydoh.resolve("example.com")
ips = savdoh.resolve("example.com")
```
или подменить резолвинг вообще везде в питоне одной строкой — `requests`, `aiohttp`, что угодно на сокетах будет резолвить через DoH:
```python
import pydoh
pydoh.patch_socket()
import savdoh
savdoh.patch_socket()
```
## фичи

View file

@ -3,7 +3,7 @@ requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "pydoh"
name = "savdoh"
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/pydoh"
Issues = "https://github.com/ImSavsis/pydoh/issues"
Homepage = "https://github.com/ImSavsis/savdoh"
Issues = "https://github.com/ImSavsis/savdoh/issues"
[project.optional-dependencies]
dev = ["pytest", "build", "twine"]
[tool.hatch.build.targets.wheel]
packages = ["src/pydoh"]
packages = ["src/savdoh"]

View file

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

View file

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

View file

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

View file

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

View file

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