revert: back to pydoh name
This commit is contained in:
parent
9b9518ed27
commit
2c1e4617cf
16 changed files with 32 additions and 32 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -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:
|
||||
|
|
|
|||
32
README.md
32
README.md
|
|
@ -1,41 +1,41 @@
|
|||
# savdoh
|
||||
# pydoh
|
||||
|
||||
[](https://github.com/ImSavsis/savdoh/actions/workflows/ci.yml)
|
||||
[](https://codecov.io/gh/ImSavsis/savdoh)
|
||||
[](https://pypi.org/project/savdoh/)
|
||||
[](https://pypi.org/project/savdoh/)
|
||||
[](https://pypi.org/project/savdoh/)
|
||||
[](https://github.com/ImSavsis/savdoh/blob/master/LICENSE)
|
||||
[](https://github.com/ImSavsis/pydoh/actions/workflows/ci.yml)
|
||||
[](https://codecov.io/gh/ImSavsis/pydoh)
|
||||
[](https://pypi.org/project/pydoh/)
|
||||
[](https://pypi.org/project/pydoh/)
|
||||
[](https://pypi.org/project/pydoh/)
|
||||
[](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()
|
||||
```
|
||||
|
||||
## фичи
|
||||
|
|
|
|||
10
llms.txt
10
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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import time
|
||||
|
||||
from savdoh.cache import TTLCache
|
||||
from pydoh.cache import TTLCache
|
||||
|
||||
|
||||
def test_cache_hit():
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from savdoh import resolve
|
||||
from pydoh import resolve
|
||||
|
||||
|
||||
def test_live_resolve_example_com():
|
||||
|
|
|
|||
|
|
@ -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():
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue