feat: 为出站请求统一接入 HTTP 代理
This commit is contained in:
@@ -37,6 +37,7 @@ from typing import Any
|
||||
import httpx
|
||||
|
||||
from app.shared.config import Settings
|
||||
from app.shared.proxy import httpx_client_options
|
||||
from app.shared.errors import NotLoggedInError, UpstreamRequestError
|
||||
from app.trading.core import auth_site
|
||||
|
||||
@@ -110,7 +111,7 @@ class AuthSession:
|
||||
headers=profile.headers(),
|
||||
timeout=self._settings.request_timeout_seconds,
|
||||
follow_redirects=True,
|
||||
proxy=self._settings.httpx_proxy,
|
||||
**httpx_client_options(self._settings),
|
||||
http2=True,
|
||||
)
|
||||
self._sites[name] = _SiteAuth(name=name, client=client)
|
||||
|
||||
Reference in New Issue
Block a user