From 9b0a75cba146b11c26e59cc504b8363408bc00e3 Mon Sep 17 00:00:00 2001 From: bboysoul <31786046+bboysoulcn@users.noreply.github.com> Date: Mon, 28 Jun 2021 22:35:21 +0800 Subject: [PATCH] Update https.go --- server/proxy/https.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/proxy/https.go b/server/proxy/https.go index 3e7e262..0a3e261 100644 --- a/server/proxy/https.go +++ b/server/proxy/https.go @@ -80,7 +80,6 @@ func (https *HttpsServer) Start() error { } } //change the host and header and set proxy setting - common.ChangeHostAndHeader(r, host.HostChange, host.HeaderChange, c.Conn.RemoteAddr().String(), https.addOrigin) acceptConn := conn.NewConn(c) acceptConn.Rb = rb l.acceptConn <- acceptConn @@ -126,6 +125,7 @@ func (https *HttpsServer) handleHttps(c net.Conn) { if targetAddr, err = host.Target.GetRandomTarget(); err != nil { logs.Warn(err.Error()) } + common.ChangeHostAndHeader(r, host.HostChange, host.HeaderChange, c.Conn.RemoteAddr().String(), s.addOrigin) logs.Trace("new https connection,clientId %d,host %s,remote address %s", host.Client.Id, r.Host, c.RemoteAddr().String()) https.DealClient(conn.NewConn(c), host.Client, targetAddr, rb, common.CONN_TCP, nil, host.Flow, host.Target.LocalProxy) }