From 53b04d560b0a4d3aaed62eb30aaa971bdccf2de6 Mon Sep 17 00:00:00 2001 From: RPRX <63339210+RPRX@users.noreply.github.com> Date: Fri, 20 Dec 2024 07:19:41 +0000 Subject: [PATCH] XHTTP client: Make H3 httptrace work on v2rayNG Introduced in https://github.com/XTLS/Xray-core/pull/4150 --- app/dns/nameserver_quic.go | 2 +- common/protocol/quic/sniff.go | 2 +- go.mod | 4 +--- go.sum | 4 ++-- transport/internet/splithttp/dialer.go | 4 ++-- transport/internet/splithttp/hub.go | 4 ++-- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/app/dns/nameserver_quic.go b/app/dns/nameserver_quic.go index 435cd0a3..5bb8df1d 100644 --- a/app/dns/nameserver_quic.go +++ b/app/dns/nameserver_quic.go @@ -9,7 +9,7 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" + "github.com/xtls/quic-go" "github.com/xtls/xray-core/common" "github.com/xtls/xray-core/common/buf" "github.com/xtls/xray-core/common/errors" diff --git a/common/protocol/quic/sniff.go b/common/protocol/quic/sniff.go index 779e291b..855ef9f7 100644 --- a/common/protocol/quic/sniff.go +++ b/common/protocol/quic/sniff.go @@ -8,7 +8,7 @@ import ( "encoding/binary" "io" - "github.com/quic-go/quic-go/quicvarint" + "github.com/xtls/quic-go/quicvarint" "github.com/xtls/xray-core/common" "github.com/xtls/xray-core/common/buf" "github.com/xtls/xray-core/common/bytespool" diff --git a/go.mod b/go.mod index 187758d7..ab084d32 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/xtls/xray-core go 1.21.4 -replace github.com/quic-go/quic-go v0.46.0 => github.com/xtls/quic-go v0.46.2 - require ( github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 github.com/cloudflare/circl v1.4.0 @@ -14,7 +12,6 @@ require ( github.com/miekg/dns v1.1.62 github.com/pelletier/go-toml v1.9.5 github.com/pires/go-proxyproto v0.8.0 - github.com/quic-go/quic-go v0.46.0 github.com/refraction-networking/utls v1.6.7 github.com/sagernet/sing v0.5.1 github.com/sagernet/sing-shadowsocks v0.2.7 @@ -22,6 +19,7 @@ require ( github.com/stretchr/testify v1.10.0 github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e github.com/vishvananda/netlink v1.3.0 + github.com/xtls/quic-go v0.46.0 github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d go4.org/netipx v0.0.0-20231129151722-fdeea329fbba golang.org/x/crypto v0.31.0 diff --git a/go.sum b/go.sum index 20b0e91e..87db06b4 100644 --- a/go.sum +++ b/go.sum @@ -68,8 +68,8 @@ github.com/vishvananda/netlink v1.3.0 h1:X7l42GfcV4S6E4vHTsw48qbrV+9PVojNfIhZcwQ github.com/vishvananda/netlink v1.3.0/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs= github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= -github.com/xtls/quic-go v0.46.2 h1:bzUnZIQIH8SyqYGR6fAXzEvZauA+32J/2w2AtnEFa1o= -github.com/xtls/quic-go v0.46.2/go.mod h1:1dLehS7TIR64+vxGR70GDcatWTOtMX2PUtnKsjbTurI= +github.com/xtls/quic-go v0.46.0 h1:yfv6h+/+iOeFhFnmJiwlZgnJjr4fPb4N4rQelffbs1U= +github.com/xtls/quic-go v0.46.0/go.mod h1:mN9lAuc8Vt7eHvnQkDIH5+uHh+DcLmTBma9rLqk/rPY= github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d h1:+B97uD9uHLgAAulhigmys4BVwZZypzK7gPN3WtpgRJg= github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d/go.mod h1:dm4y/1QwzjGaK17ofi0Vs6NpKAHegZky8qk6J2JJZAE= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= diff --git a/transport/internet/splithttp/dialer.go b/transport/internet/splithttp/dialer.go index c0189d58..aed499c8 100644 --- a/transport/internet/splithttp/dialer.go +++ b/transport/internet/splithttp/dialer.go @@ -13,8 +13,8 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/http3" + "github.com/xtls/quic-go" + "github.com/xtls/quic-go/http3" "github.com/xtls/xray-core/common" "github.com/xtls/xray-core/common/buf" "github.com/xtls/xray-core/common/errors" diff --git a/transport/internet/splithttp/hub.go b/transport/internet/splithttp/hub.go index 1df029dd..b7c5098b 100644 --- a/transport/internet/splithttp/hub.go +++ b/transport/internet/splithttp/hub.go @@ -11,8 +11,8 @@ import ( "sync" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/http3" + "github.com/xtls/quic-go" + "github.com/xtls/quic-go/http3" goreality "github.com/xtls/reality" "github.com/xtls/xray-core/common" "github.com/xtls/xray-core/common/errors"