fix: 代理ip使用重构为统一方法

This commit is contained in:
shaw
2025-08-20 23:21:32 +08:00
parent a45c832278
commit cb29b3f7e4
10 changed files with 161 additions and 13 deletions

View File

@@ -135,6 +135,11 @@ async function refreshAccessToken(refreshToken, proxy = null) {
const proxyAgent = ProxyHelper.createProxyAgent(proxy)
if (proxyAgent) {
requestOptions.httpsAgent = proxyAgent
logger.info(
`🌐 Using proxy for OpenAI token refresh: ${ProxyHelper.getProxyDescription(proxy)}`
)
} else {
logger.debug('🌐 No proxy configured for OpenAI token refresh')
}
// 发送请求