🐛 fix: proxy bug (#49)

This commit is contained in:
Buer
2024-01-20 13:26:11 +08:00
committed by GitHub
parent 33bb1a04a7
commit 2cc120f35b
16 changed files with 19 additions and 18 deletions

View File

@@ -38,6 +38,8 @@ func (h *HTTPClient) getClientFromPool(proxyAddr string) *http.Client {
}
func (h *HTTPClient) returnClientToPool(client *http.Client) {
// 清除代理设置
client.Transport = nil
clientPool.Put(client)
}

View File

@@ -48,7 +48,7 @@ func GetChannel(channelType int, baseUrl, other, porxy, modelMapping string) mod
Type: channelType,
BaseURL: &baseUrl,
Other: other,
Proxy: porxy,
Proxy: &porxy,
ModelMapping: &modelMapping,
Key: GetTestToken(),
}