设置tls最低版本为1.0

This commit is contained in:
影舞者
2023-11-13 09:45:39 +08:00
parent 58890cd5e6
commit 79fa3a8920
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -229,7 +229,7 @@ func GetProtocol(host string, Timeout int64) (protocol string) {
if err != nil { if err != nil {
return return
} }
conn := tls.Client(socksconn, &tls.Config{InsecureSkipVerify: true}) conn := tls.Client(socksconn, &tls.Config{MinVersion: tls.VersionTLS10, InsecureSkipVerify: true})
defer func() { defer func() {
if conn != nil { if conn != nil {
defer func() { defer func() {
+1 -1
View File
@@ -46,7 +46,7 @@ func InitHttpClient(ThreadsNum int, DownProxy string, Timeout time.Duration) err
MaxIdleConns: 0, MaxIdleConns: 0,
MaxIdleConnsPerHost: ThreadsNum * 2, MaxIdleConnsPerHost: ThreadsNum * 2,
IdleConnTimeout: keepAlive, IdleConnTimeout: keepAlive,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, TLSClientConfig: &tls.Config{MinVersion: tls.VersionTLS10, InsecureSkipVerify: true},
TLSHandshakeTimeout: 5 * time.Second, TLSHandshakeTimeout: 5 * time.Second,
DisableKeepAlives: false, DisableKeepAlives: false,
} }