From 147a1b2714008aeddba0d0be40f93ac013250e51 Mon Sep 17 00:00:00 2001 From: bboysoul <31786046+bboysoulcn@users.noreply.github.com> Date: Tue, 29 Jun 2021 11:22:51 +0800 Subject: [PATCH] Update https.go --- server/proxy/https.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/proxy/https.go b/server/proxy/https.go index 6eed7d4..1081740 100644 --- a/server/proxy/https.go +++ b/server/proxy/https.go @@ -104,7 +104,7 @@ func (https *HttpsServer) NewHttps(l net.Listener, certFile string, keyFile stri func (https *HttpsServer) handleHttps(c net.Conn) { hostName, rb := GetServerNameFromClientHello(c) var targetAddr string - r := buildHttpsRequest(hostName) + r := buildHttpsRequest(hostName,c) var host *file.Host var err error if host, err = file.GetDb().GetInfoByHost(hostName, r); err != nil { @@ -177,7 +177,7 @@ func GetServerNameFromClientHello(c net.Conn) (string, []byte) { } // build https request -func buildHttpsRequest(hostName string) *http.Request { +func buildHttpsRequest(hostName string, c) *http.Request { r := new(http.Request) r.RequestURI = "/" r.URL = new(url.URL)