refactor(proxy): migrate to zerolog structured logging

This commit is contained in:
Alexander
2026-04-10 18:19:13 +02:00
parent 76bf651742
commit 4e22c463cf
3 changed files with 91 additions and 17 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
package proxy
import (
"log"
"net"
"net/http"
"sync"
tls "github.com/refraction-networking/utls"
"github.com/rs/zerolog/log"
"golang.org/x/net/http2"
)
@@ -90,7 +90,7 @@ func (t *utlsRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)
port = "443"
}
addr := net.JoinHostPort(hostname, port)
log.Printf("utls: RoundTrip to %s (Chrome TLS fingerprint, HTTP/2)", addr)
log.Debug().Str("addr", addr).Msg("uTLS round trip")
h2Conn, err := t.getOrCreateConnection(hostname, addr)
if err != nil {