DNS toolkit for Python supporting almost all record types with high-level and low-level DNS operations
85
A utility that constructs a DNS resolver which prefers DDR-discovered encrypted endpoints and falls back to configured encrypted transports while honoring custom security settings.
@generates
from typing import Iterable, Optional
class EncryptedResolver:
def __init__(
self,
service_name: str,
bootstrap_ip: str,
doh_endpoints: Optional[Iterable[str]] = None,
doq_endpoints: Optional[Iterable[str]] = None,
dot_endpoints: Optional[Iterable[str]] = None,
tls_settings: Optional[dict] = None,
): ...
def refresh(self) -> None:
"""Re-run discovery/configuration using DDR and provided fallbacks."""
def resolve(self, hostname: str, rrtype: str = "A") -> list[str]:
"""Resolve a hostname using the configured encrypted resolver."""
@property
def transport(self) -> str:
"""Current transport label (e.g., 'DDR', 'DoH', 'DoQ', 'DoT')."""DNS resolution with DDR discovery and encrypted resolver transports.
Install with Tessl CLI
npx tessl i tessl/pypi-dnspythondocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10