From 29e0d7e56e1c5e3787fd5deb2026a5b9e415ee69 Mon Sep 17 00:00:00 2001 From: wyx2685 Date: Fri, 20 Dec 2024 16:46:05 +0900 Subject: [PATCH] fix hy2 core logger nil pointer --- core/hy2/config.go | 2 +- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/hy2/config.go b/core/hy2/config.go index 1363fd4..f641153 100644 --- a/core/hy2/config.go +++ b/core/hy2/config.go @@ -342,7 +342,7 @@ func (n *Hysteria2node) getMasqHandler(tlsconfig *server.TLSConfig, conn net.Pac s := masq.MasqTCPServer{ QUICPort: extractPortFromAddr(conn.LocalAddr().String()), HTTPSPort: extractPortFromAddr(c.Masquerade.ListenHTTPS), - Handler: &masqHandlerLogWrapper{H: handler, QUIC: false}, + Handler: &masqHandlerLogWrapper{H: handler, QUIC: false, Logger: n.Logger}, TLSConfig: &tls.Config{ Certificates: tlsconfig.Certificates, GetCertificate: tlsconfig.GetCertificate, diff --git a/go.mod b/go.mod index 9ec4276..cb06198 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.18.2 - github.com/xtls/xray-core v1.8.25-0.20241212121918-7463561856f7 + github.com/xtls/xray-core v1.8.25-0.20241215123619-7d0a80b501d4 go.uber.org/zap v1.27.0 golang.org/x/crypto v0.30.0 golang.org/x/sys v0.28.0 diff --git a/go.sum b/go.sum index be26b06..0eb9c3b 100644 --- a/go.sum +++ b/go.sum @@ -1016,6 +1016,8 @@ github.com/xtls/xray-core v1.8.25-0.20241211140539-8cd9a743764a h1:aVhLpHaB2To7e github.com/xtls/xray-core v1.8.25-0.20241211140539-8cd9a743764a/go.mod h1:lduNPDkXku+Avphl8g7W0yJrHhWyxdOnPo0XGYdF0Aw= github.com/xtls/xray-core v1.8.25-0.20241212121918-7463561856f7 h1:H1793FyHWPvU5RTTbBC0VR5ICt5D7RTY7BYs01KoQq0= github.com/xtls/xray-core v1.8.25-0.20241212121918-7463561856f7/go.mod h1:lduNPDkXku+Avphl8g7W0yJrHhWyxdOnPo0XGYdF0Aw= +github.com/xtls/xray-core v1.8.25-0.20241215123619-7d0a80b501d4 h1:zdd86FEjFZjAaRbWxiZQM2QPOzk/d6cig2DaE7c3MDQ= +github.com/xtls/xray-core v1.8.25-0.20241215123619-7d0a80b501d4/go.mod h1:lduNPDkXku+Avphl8g7W0yJrHhWyxdOnPo0XGYdF0Aw= github.com/yandex-cloud/go-genproto v0.0.0-20240911120709-1fa0cb6f47c2 h1:WgeEP+8WizCQyccJNHOMLONq23qVAzYHtyg5qTdUWmg= github.com/yandex-cloud/go-genproto v0.0.0-20240911120709-1fa0cb6f47c2/go.mod h1:HEUYX/p8966tMUHHT+TsS0hF/Ca/NYwqprC5WXSDMfE= github.com/yandex-cloud/go-sdk v0.0.0-20240911121212-e4e74d0d02f5 h1:Q4LvUMF4kzaGtopoIdXReL9/qGtmzOewBhF3dQvuHMU=