Ai
135 Star 513 Fork 122

GVP悬镜安全/OpenSCA-cli

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
httpclient.go 776 Bytes
一键复制 编辑 原始数据 按行查看 历史
骆天奇 提交于 2024-01-17 14:47 +08:00 . fix: saas proxy
package common
import (
"crypto/tls"
"net/http"
"time"
)
var HttpDownloadClient = &http.Client{
Transport: &http.Transport{
MaxIdleConns: 50,
MaxConnsPerHost: 50,
MaxIdleConnsPerHost: 50,
IdleConnTimeout: 30 * time.Second,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: false,
},
},
}
func SetHttpDownloadClient(do func(c *http.Client)) {
if do != nil {
do(HttpDownloadClient)
}
}
var HttpSaasClient = &http.Client{
Transport: &http.Transport{
MaxIdleConns: 1,
MaxConnsPerHost: 1,
MaxIdleConnsPerHost: 1,
IdleConnTimeout: 30 * time.Second,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: false,
},
},
}
func SetHttpSaasClient(do func(c *http.Client)) {
if do != nil {
do(HttpSaasClient)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/XmirrorSecurity/OpenSCA-cli.git
git@gitee.com:XmirrorSecurity/OpenSCA-cli.git
XmirrorSecurity
OpenSCA-cli
OpenSCA-cli
master

搜索帮助