chore: clean up GeoIP timeout follow-up (#213)

Remove dead null checks, document CLOAKBROWSER_GEOIP_TIMEOUT_SECONDS
env var, credit contributor.

Fix review findings:
- Use timeout-bounded resolve_proxy_exit_ip in _resolve_webrtc_args
- Add missing timeout handler on tunneled HTTPS request in JS
- Reject nan/inf in Python timeout parsing (parity with JS)
- Recompute deadline after CONNECT succeeds in JS proxy tunnel
This commit is contained in:
CloakHQ
2026-05-11 21:15:36 +02:00
parent 71f57d00d1
commit f8026a7b39
4 changed files with 12 additions and 16 deletions
+3
View File
@@ -12,6 +12,7 @@ from __future__ import annotations
import ipaddress
import logging
import math
import os
import socket
import tempfile
@@ -167,6 +168,8 @@ def _get_geoip_timeout_seconds() -> float:
try:
timeout = float(raw)
except ValueError:
timeout = float("nan")
if not math.isfinite(timeout):
logger.warning(
"Invalid %s=%r; using %.1fs",
GEOIP_TIMEOUT_ENV,