From 2809a6c41680609cbfdfa27b9351bd2611f9c945 Mon Sep 17 00:00:00 2001 From: wi1dcard Date: Sun, 17 Mar 2024 10:58:52 +0800 Subject: [PATCH] Move verbose print client hello data to proxyserver. --- pkg/fingerprint/header_injector.go | 2 -- pkg/proxyserver/proxyserver.go | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/fingerprint/header_injector.go b/pkg/fingerprint/header_injector.go index 37cdb61..2b734e8 100644 --- a/pkg/fingerprint/header_injector.go +++ b/pkg/fingerprint/header_injector.go @@ -80,8 +80,6 @@ func (i *FingerprintHeaderInjector) GetHeaderValue(req *http.Request) (string, e return "", fmt.Errorf("failed to get context") } - vlogf("client hello (%s): %x", req.RemoteAddr, data.ClientHelloRecord) - start := time.Now() fp, err := i.FingerprintFunc(data) duration := time.Since(start) diff --git a/pkg/proxyserver/proxyserver.go b/pkg/proxyserver/proxyserver.go index d381663..d3303a1 100644 --- a/pkg/proxyserver/proxyserver.go +++ b/pkg/proxyserver/proxyserver.go @@ -96,6 +96,8 @@ func (server *Server) serveConn(conn net.Conn) { return } + server.vlogf("client hello (%s): %x", conn.RemoteAddr().String(), rec) + cs := tlsConn.ConnectionState() // either directly serve the http2 conn, or, send to the channel