From 72b9b829e9e47cd2e533251d6341d311e222e050 Mon Sep 17 00:00:00 2001 From: yaling888 <73897884+yaling888@users.noreply.github.com> Date: Mon, 16 May 2022 01:23:14 +0800 Subject: [PATCH] Fix: set mitm outbound --- tunnel/tunnel.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index 85f39969..6562eb82 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -101,7 +101,11 @@ func SetMode(m TunnelMode) { // SetMitmOutbound set the MITM outbound func SetMitmOutbound(outbound C.ProxyAdapter) { - mitmProxy = A.NewProxy(outbound) + if outbound != nil { + mitmProxy = A.NewProxy(outbound) + } else { + mitmProxy = nil + } } // Rewrites return all rewrites