Explorar o código

:art: 下载更新安装包忽略 TLS 证书校验

Liang Ding %!s(int64=2) %!d(string=hai) anos
pai
achega
d369d52499
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      kernel/model/updater.go

+ 1 - 1
kernel/model/updater.go

@@ -171,7 +171,7 @@ func downloadInstallPkg(pkgURL, checksum string) (err error) {
 	}
 	}
 
 
 	logging.LogInfof("downloading install package [%s]", pkgURL)
 	logging.LogInfof("downloading install package [%s]", pkgURL)
-	client := req.C().SetTLSHandshakeTimeout(7 * time.Second).SetTimeout(10 * time.Minute)
+	client := req.C().SetTLSHandshakeTimeout(7 * time.Second).SetTimeout(10 * time.Minute).DisableInsecureSkipVerify()
 	callback := func(info req.DownloadInfo) {
 	callback := func(info req.DownloadInfo) {
 		progress := fmt.Sprintf("%.2f%%", float64(info.DownloadedSize)/float64(info.Response.ContentLength)*100.0)
 		progress := fmt.Sprintf("%.2f%%", float64(info.DownloadedSize)/float64(info.Response.ContentLength)*100.0)
 		// logging.LogDebugf("downloading install package [%s %s]", pkgURL, progress)
 		// logging.LogDebugf("downloading install package [%s %s]", pkgURL, progress)