fix: C-01 WebRTC policy value, C-02 scoped taskkill, C-04 preflight race, E-11 socket timeout, E-27 ban test dedup, full audit doc
Some checks failed
CI / Test Python 3.10 (push) Has been cancelled
CI / Test Python 3.11 (push) Has been cancelled
CI / Test Python 3.12 (push) Has been cancelled

This commit is contained in:
Dr Jones
2026-05-22 00:43:57 -07:00
parent 311abb933a
commit 255fdf3e8c
7 changed files with 267 additions and 199 deletions

View File

@@ -136,6 +136,7 @@ def flush_dns_cache() -> tuple[bool, str]:
def _resolve_direct(hostname: str, timeout: float = 4.0) -> list[str]:
"""Resolve hostname using system DNS (direct, not through proxy)."""
_prev = socket.getdefaulttimeout()
try:
socket.setdefaulttimeout(timeout)
infos = socket.getaddrinfo(hostname, None)
@@ -148,7 +149,7 @@ def _resolve_direct(hostname: str, timeout: float = 4.0) -> list[str]:
except Exception:
return []
finally:
socket.setdefaulttimeout(None)
socket.setdefaulttimeout(_prev)
def _resolve_via_proxy(hostname: str, proxy_url: str, timeout: float = 8.0) -> list[str]: