mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
fix: 代理ip使用重构为统一方法
This commit is contained in:
@@ -502,10 +502,17 @@ class ClaudeRelayService {
|
||||
const account = accountData.find((acc) => acc.id === accountId)
|
||||
|
||||
if (!account || !account.proxy) {
|
||||
logger.debug('🌐 No proxy configured for Claude account')
|
||||
return null
|
||||
}
|
||||
|
||||
return ProxyHelper.createProxyAgent(account.proxy)
|
||||
const proxyAgent = ProxyHelper.createProxyAgent(account.proxy)
|
||||
if (proxyAgent) {
|
||||
logger.info(
|
||||
`🌐 Using proxy for Claude request: ${ProxyHelper.getProxyDescription(account.proxy)}`
|
||||
)
|
||||
}
|
||||
return proxyAgent
|
||||
} catch (error) {
|
||||
logger.warn('⚠️ Failed to create proxy agent:', error)
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user