mirror of
https://github.com/soxoj/maigret.git
synced 2026-10-19 06:43:27 +02:00
resolve_db_path() runs before the first site check and fetched db_meta.json and data.json with bare requests.get() calls, so a run started with --proxy still reached raw.githubusercontent.com from the real address once every 24 hours. Auto-update is on by default, and only HTTP_PROXY / HTTPS_PROXY were honoured, by accident of requests reading them itself. Thread the proxy into both requests and into force_update(), normalising the scheme for PySocks the way the other two transports already are. An explicit proxies mapping also wins over the environment, so NO_PROXY cannot bypass it. When the proxy is unreachable requests raises and the existing handler reports the update as failed and keeps the local database. There is deliberately no retry without the proxy: that would put the leak back on the failure path. Fixes #3108 Co-authored-by: Claude Opus 5 <noreply@anthropic.com>