fix hy2 core logger nil pointer
Some checks failed
Build and Release / build (386, freebsd) (push) Has been cancelled
Build and Release / build (386, linux) (push) Has been cancelled
Build and Release / build (386, windows) (push) Has been cancelled
Build and Release / build (amd64, darwin) (push) Has been cancelled
Build and Release / build (amd64, freebsd) (push) Has been cancelled
Build and Release / build (amd64, linux) (push) Has been cancelled
Build and Release / build (amd64, windows) (push) Has been cancelled
Build and Release / build (arm, 5, linux) (push) Has been cancelled
Build and Release / build (arm, 6, linux) (push) Has been cancelled
Build and Release / build (arm, 7, freebsd) (push) Has been cancelled
Build and Release / build (arm, 7, linux) (push) Has been cancelled
Build and Release / build (arm64, android) (push) Has been cancelled
Build and Release / build (arm64, darwin) (push) Has been cancelled
Build and Release / build (arm64, freebsd) (push) Has been cancelled
Build and Release / build (arm64, linux) (push) Has been cancelled
Build and Release / build (mips, linux) (push) Has been cancelled
Build and Release / build (mips64, linux) (push) Has been cancelled
Build and Release / build (mips64le, linux) (push) Has been cancelled
Build and Release / build (mipsle, linux) (push) Has been cancelled
Build and Release / build (ppc64, linux) (push) Has been cancelled
Build and Release / build (ppc64le, linux) (push) Has been cancelled
Build and Release / build (riscv64, linux) (push) Has been cancelled
Build and Release / build (s390x, linux) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled

This commit is contained in:
wyx2685 2024-12-20 16:46:05 +09:00
parent 08ebbed9fb
commit 29e0d7e56e
No known key found for this signature in database
GPG Key ID: 8827A30FF1DB1379
3 changed files with 4 additions and 2 deletions

View File

@ -342,7 +342,7 @@ func (n *Hysteria2node) getMasqHandler(tlsconfig *server.TLSConfig, conn net.Pac
s := masq.MasqTCPServer{ s := masq.MasqTCPServer{
QUICPort: extractPortFromAddr(conn.LocalAddr().String()), QUICPort: extractPortFromAddr(conn.LocalAddr().String()),
HTTPSPort: extractPortFromAddr(c.Masquerade.ListenHTTPS), HTTPSPort: extractPortFromAddr(c.Masquerade.ListenHTTPS),
Handler: &masqHandlerLogWrapper{H: handler, QUIC: false}, Handler: &masqHandlerLogWrapper{H: handler, QUIC: false, Logger: n.Logger},
TLSConfig: &tls.Config{ TLSConfig: &tls.Config{
Certificates: tlsconfig.Certificates, Certificates: tlsconfig.Certificates,
GetCertificate: tlsconfig.GetCertificate, GetCertificate: tlsconfig.GetCertificate,

2
go.mod
View File

@ -20,7 +20,7 @@ require (
github.com/sirupsen/logrus v1.9.3 github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.1 github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.18.2 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 go.uber.org/zap v1.27.0
golang.org/x/crypto v0.30.0 golang.org/x/crypto v0.30.0
golang.org/x/sys v0.28.0 golang.org/x/sys v0.28.0

2
go.sum
View File

@ -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.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 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.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 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-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= github.com/yandex-cloud/go-sdk v0.0.0-20240911121212-e4e74d0d02f5 h1:Q4LvUMF4kzaGtopoIdXReL9/qGtmzOewBhF3dQvuHMU=