From 6941854ce288d7ae5cdb89c23cc9b735db4517f7 Mon Sep 17 00:00:00 2001 From: Shtorm <108103062+shtorm-7@users.noreply.github.com> Date: Sat, 18 Jul 2026 14:21:06 +0300 Subject: [PATCH] Fix XHTTP --- common/tls/reality_client.go | 6 +++--- option/v2ray_transport.go | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/tls/reality_client.go b/common/tls/reality_client.go index d8328770..65f17e44 100644 --- a/common/tls/reality_client.go +++ b/common/tls/reality_client.go @@ -168,9 +168,9 @@ func (e *RealityClientConfig) ClientHandshake(ctx context.Context, conn net.Conn } binary.BigEndian.PutUint64(hello.SessionId, uint64(nowTime.Unix())) - hello.SessionId[0] = 1 - hello.SessionId[1] = 8 - hello.SessionId[2] = 1 + hello.SessionId[0] = 26 + hello.SessionId[1] = 7 + hello.SessionId[2] = 11 binary.BigEndian.PutUint32(hello.SessionId[4:], uint32(time.Now().Unix())) copy(hello.SessionId[8:], e.shortID[:]) if debug.Enabled { diff --git a/option/v2ray_transport.go b/option/v2ray_transport.go index 3a9ee057..8f6c6948 100644 --- a/option/v2ray_transport.go +++ b/option/v2ray_transport.go @@ -118,13 +118,13 @@ type V2RayXHTTPBaseOptions struct { Path string `json:"path,omitempty"` Headers map[string]string `json:"headers,omitempty"` DomainStrategy DomainStrategy `json:"domain_strategy,omitempty"` - XPaddingBytes badoption.Range[int] `json:"x_padding_bytes"` + XPaddingBytes badoption.Range[int] `json:"x_padding_bytes"` NoGRPCHeader bool `json:"no_grpc_header,omitempty"` NoSSEHeader bool `json:"no_sse_header,omitempty"` - ScMaxEachPostBytes *badoption.Range[int] `json:"sc_max_each_post_bytes"` - ScMinPostsIntervalMs *badoption.Range[int] `json:"sc_min_posts_interval_ms"` + ScMaxEachPostBytes *badoption.Range[int] `json:"sc_max_each_post_bytes"` + ScMinPostsIntervalMs *badoption.Range[int] `json:"sc_min_posts_interval_ms"` ScMaxBufferedPosts int64 `json:"sc_max_buffered_posts,omitempty"` - ScStreamUpServerSecs *badoption.Range[int] `json:"sc_stream_up_server_secs"` + ScStreamUpServerSecs *badoption.Range[int] `json:"sc_stream_up_server_secs"` ServerMaxHeaderBytes int `json:"server_max_header_bytes"` TrustedXForwardedFor badoption.Listable[string] `json:"trusted_x_forwarded_for,omitempty"` Xmux *V2RayXHTTPXmuxOptions `json:"xmux"` @@ -140,9 +140,9 @@ type V2RayXHTTPBaseOptions struct { SeqKey string `json:"seq_key,omitempty"` UplinkDataPlacement string `json:"uplink_data_placement,omitempty"` UplinkDataKey string `json:"uplink_data_key,omitempty"` - UplinkChunkSize *badoption.Range[int] `json:"uplink_chunk_size,omitempty"` + UplinkChunkSize *badoption.Range[int] `json:"uplink_chunk_size,omitempty"` SessionIDTable string `json:"session_id_table,omitempty"` - SessionIDLength badoption.Range[int] `json:"session_id_length,omitempty"` + SessionIDLength badoption.Range[int] `json:"session_id_length,omitempty"` CongestionController string `json:"congestion_controller,omitempty"` CWND int `json:"cwnd,omitempty"` } @@ -497,7 +497,7 @@ type V2RayXHTTPXmuxOptions struct { CMaxReuseTimes badoption.Range[int] `json:"c_max_reuse_times"` HMaxRequestTimes badoption.Range[int] `json:"h_max_request_times"` HMaxReusableSecs badoption.Range[int] `json:"h_max_reusable_secs"` - HKeepAlivePeriod int64 `json:"h_keep_alive_period"` + HKeepAlivePeriod int64 `json:"h_keep_alive_period"` } func (m *V2RayXHTTPXmuxOptions) GetNormalizedMaxConcurrency() badoption.Range[int] {