From 2e37bb82223afdd84a8f6ee12629879eb04c3702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BC=AF=E8=8D=A3?= Date: Wed, 11 Jan 2023 10:43:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BB=A3=E7=90=86=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=B8=AD=E7=9A=84=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proxy/proxy.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proxy/proxy.go b/proxy/proxy.go index 66338a2..ec6ea75 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -3,6 +3,7 @@ package proxy import ( "bytes" "context" + "crypto/x509" "io" "net" "net/http" @@ -308,3 +309,7 @@ func (proxy *Proxy) handleConnect(res http.ResponseWriter, req *http.Request) { transfer(log, conn, cconn) } + +func (proxy *Proxy) GetCertificate() x509.Certificate { + return proxy.interceptor.ca.RootCert +}