From bb9ef5a523b4c274f3dfcf7f0a88f50173833be3 Mon Sep 17 00:00:00 2001 From: lqqyt2423 <974923609@qq.com> Date: Fri, 11 Dec 2020 16:58:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E6=AD=A2=E8=87=AA=E5=8A=A8=E9=87=8D?= =?UTF-8?q?=E5=AE=9A=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proxy/proxy.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/proxy.go b/proxy/proxy.go index f3a3fd7..d304949 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -202,6 +202,10 @@ func NewProxy(opts *Options) (*Proxy, error) { KeyLogWriter: GetTlsKeyLogWriter(), }, }, + CheckRedirect: func(req *http.Request, via []*http.Request) error { + // 禁止自动重定向 + return http.ErrUseLastResponse + }, } mitm, err := NewMitmMemory(proxy)