feat: 为出站请求统一接入 HTTP 代理

This commit is contained in:
2026-08-14 16:08:39 +08:00
parent 3dc2aeb3a2
commit fabca9510d
23 changed files with 213 additions and 14 deletions
+2 -1
View File
@@ -23,6 +23,7 @@ from opentelemetry import trace
from app.scraping.core import site
from app.shared.config import Settings
from app.shared.proxy import httpx_client_options
from app.shared.errors import (
ItemNotFoundError,
ResourceBusyError,
@@ -91,7 +92,7 @@ class SiteSession:
headers=site.default_headers(mobile=mobile),
timeout=self._settings.request_timeout_seconds,
follow_redirects=True,
proxy=self._settings.httpx_proxy,
**httpx_client_options(self._settings),
http2=True,
),
)