feat: 为出站请求统一接入 HTTP 代理
This commit is contained in:
@@ -97,6 +97,7 @@ from app.shared.purchase_contract import (
|
||||
basket_domain_of,
|
||||
inventory_flag_for,
|
||||
)
|
||||
from app.shared.proxy import playwright_launch_proxy
|
||||
from app.shared.task_state import OrderState
|
||||
from app.trading.core import auth_site
|
||||
from app.trading.worker.models import LeaseTask
|
||||
@@ -556,6 +557,7 @@ class SiteInteractor:
|
||||
# 状态的操作(加购/结算/支付)都必须走非无头浏览器
|
||||
headless=False,
|
||||
channel=self._settings.browser_channel or None,
|
||||
proxy=playwright_launch_proxy(self._settings),
|
||||
args=["--no-first-run", "--disable-blink-features=AutomationControlled"],
|
||||
)
|
||||
self._context = await self._browser.new_context(
|
||||
|
||||
Reference in New Issue
Block a user