增加了代理平台和日志
This commit is contained in:
@@ -55,12 +55,20 @@ class LoginBatchRunner:
|
||||
# 共享代理管理器(带锁,避免并发白名单限流;极验失败时可刷新代理)
|
||||
self._shared_proxy_manager = None
|
||||
if proxy_config and proxy_config.enabled and proxy_config.api_url:
|
||||
wl_uid = proxy_config.whitelist_uid or "" if proxy_config.whitelist_enabled else ""
|
||||
wl_ukey = proxy_config.whitelist_ukey or "" if proxy_config.whitelist_enabled else ""
|
||||
wl_platform = "xiequ"
|
||||
wl_credentials = None
|
||||
if proxy_config.whitelist_enabled:
|
||||
wl_platform = getattr(proxy_config, 'whitelist_platform', None) or "xiequ"
|
||||
wl_credentials = getattr(proxy_config, 'whitelist_credentials', None)
|
||||
# 向后兼容:旧字段有值但新字段为空
|
||||
if not wl_credentials and proxy_config.whitelist_uid and proxy_config.whitelist_ukey:
|
||||
wl_platform = "xiequ"
|
||||
wl_credentials = {"uid": proxy_config.whitelist_uid, "ukey": proxy_config.whitelist_ukey}
|
||||
|
||||
self._shared_proxy_manager = get_proxy_manager(
|
||||
proxy_config.api_url,
|
||||
whitelist_uid=wl_uid,
|
||||
whitelist_ukey=wl_ukey,
|
||||
whitelist_platform=wl_platform,
|
||||
whitelist_credentials=wl_credentials,
|
||||
)
|
||||
|
||||
def stop(self):
|
||||
|
||||
Reference in New Issue
Block a user