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

@@ -862,7 +862,17 @@ class ClaudeAccountService {
// 🌐 创建代理agent使用统一的代理工具
_createProxyAgent(proxyConfig) {
return ProxyHelper.createProxyAgent(proxyConfig)
const proxyAgent = ProxyHelper.createProxyAgent(proxyConfig)
if (proxyAgent) {
logger.info(
`🌐 Using proxy for Claude request: ${ProxyHelper.getProxyDescription(proxyConfig)}`
)
} else if (proxyConfig) {
logger.debug('🌐 Failed to create proxy agent for Claude')
} else {
logger.debug('🌐 No proxy configured for Claude request')
}
return proxyAgent
}
// 🔐 加密敏感数据