From a5522d16add7627d2c892f9866f505b13a9e06c0 Mon Sep 17 00:00:00 2001 From: gaoshiyao Date: Mon, 10 Aug 2020 00:21:43 +0800 Subject: [PATCH] tls --- src/handler/proxyhandler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handler/proxyhandler.go b/src/handler/proxyhandler.go index 5e5ef30..aa07b99 100644 --- a/src/handler/proxyhandler.go +++ b/src/handler/proxyhandler.go @@ -3,6 +3,7 @@ package handler import ( "bytes" "compress/gzip" + "crypto/tls" "encoding/json" "errors" "fmt" @@ -45,7 +46,7 @@ func Proxy(c *gin.Context) { c.JSON(200, res) return } - f, _ := forward.New(forward.PassHostHeader(true), forward.ResponseModifier(func(resp *http.Response) error { + f, _ := forward.New(forward.PassHostHeader(true), forward.WebsocketTLSClientConfig(&tls.Config{InsecureSkipVerify: true}), forward.ResponseModifier(func(resp *http.Response) error { //Resp = resp //判断是否超过调用次数是否可以调用 callflag, sensitiveflag, err := service.QueryCallsCount(proxyData) -- 2.26.0