mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
style: 移除尾随逗号
WHAT: 移除 SocksProxyAgent 配置对象中的尾随逗号 WHY: 保持代码格式的一致性和整洁性,符合项目的代码规范 HOW: 删除 family: 4 后的尾随逗号;无功能变更;纯格式化修改
This commit is contained in:
@@ -22,7 +22,7 @@ function createProxyAgent(proxy) {
|
|||||||
const auth = proxy.username && proxy.password ? `${proxy.username}:${proxy.password}@` : ''
|
const auth = proxy.username && proxy.password ? `${proxy.username}:${proxy.password}@` : ''
|
||||||
const socksUrl = `socks5://${auth}${proxy.host}:${proxy.port}`
|
const socksUrl = `socks5://${auth}${proxy.host}:${proxy.port}`
|
||||||
return new SocksProxyAgent(socksUrl, {
|
return new SocksProxyAgent(socksUrl, {
|
||||||
family: 4,
|
family: 4
|
||||||
})
|
})
|
||||||
} else if (proxy.type === 'http' || proxy.type === 'https') {
|
} else if (proxy.type === 'http' || proxy.type === 'https') {
|
||||||
const auth = proxy.username && proxy.password ? `${proxy.username}:${proxy.password}@` : ''
|
const auth = proxy.username && proxy.password ? `${proxy.username}:${proxy.password}@` : ''
|
||||||
|
|||||||
Reference in New Issue
Block a user