mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-21 06:43:30 +03:00
Fix XHTTP
This commit is contained in:
@@ -168,9 +168,9 @@ func (e *RealityClientConfig) ClientHandshake(ctx context.Context, conn net.Conn
|
|||||||
}
|
}
|
||||||
binary.BigEndian.PutUint64(hello.SessionId, uint64(nowTime.Unix()))
|
binary.BigEndian.PutUint64(hello.SessionId, uint64(nowTime.Unix()))
|
||||||
|
|
||||||
hello.SessionId[0] = 1
|
hello.SessionId[0] = 26
|
||||||
hello.SessionId[1] = 8
|
hello.SessionId[1] = 7
|
||||||
hello.SessionId[2] = 1
|
hello.SessionId[2] = 11
|
||||||
binary.BigEndian.PutUint32(hello.SessionId[4:], uint32(time.Now().Unix()))
|
binary.BigEndian.PutUint32(hello.SessionId[4:], uint32(time.Now().Unix()))
|
||||||
copy(hello.SessionId[8:], e.shortID[:])
|
copy(hello.SessionId[8:], e.shortID[:])
|
||||||
if debug.Enabled {
|
if debug.Enabled {
|
||||||
|
|||||||
@@ -118,13 +118,13 @@ type V2RayXHTTPBaseOptions struct {
|
|||||||
Path string `json:"path,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
Headers map[string]string `json:"headers,omitempty"`
|
Headers map[string]string `json:"headers,omitempty"`
|
||||||
DomainStrategy DomainStrategy `json:"domain_strategy,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"`
|
NoGRPCHeader bool `json:"no_grpc_header,omitempty"`
|
||||||
NoSSEHeader bool `json:"no_sse_header,omitempty"`
|
NoSSEHeader bool `json:"no_sse_header,omitempty"`
|
||||||
ScMaxEachPostBytes *badoption.Range[int] `json:"sc_max_each_post_bytes"`
|
ScMaxEachPostBytes *badoption.Range[int] `json:"sc_max_each_post_bytes"`
|
||||||
ScMinPostsIntervalMs *badoption.Range[int] `json:"sc_min_posts_interval_ms"`
|
ScMinPostsIntervalMs *badoption.Range[int] `json:"sc_min_posts_interval_ms"`
|
||||||
ScMaxBufferedPosts int64 `json:"sc_max_buffered_posts,omitempty"`
|
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"`
|
ServerMaxHeaderBytes int `json:"server_max_header_bytes"`
|
||||||
TrustedXForwardedFor badoption.Listable[string] `json:"trusted_x_forwarded_for,omitempty"`
|
TrustedXForwardedFor badoption.Listable[string] `json:"trusted_x_forwarded_for,omitempty"`
|
||||||
Xmux *V2RayXHTTPXmuxOptions `json:"xmux"`
|
Xmux *V2RayXHTTPXmuxOptions `json:"xmux"`
|
||||||
@@ -140,9 +140,9 @@ type V2RayXHTTPBaseOptions struct {
|
|||||||
SeqKey string `json:"seq_key,omitempty"`
|
SeqKey string `json:"seq_key,omitempty"`
|
||||||
UplinkDataPlacement string `json:"uplink_data_placement,omitempty"`
|
UplinkDataPlacement string `json:"uplink_data_placement,omitempty"`
|
||||||
UplinkDataKey string `json:"uplink_data_key,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"`
|
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"`
|
CongestionController string `json:"congestion_controller,omitempty"`
|
||||||
CWND int `json:"cwnd,omitempty"`
|
CWND int `json:"cwnd,omitempty"`
|
||||||
}
|
}
|
||||||
@@ -497,7 +497,7 @@ type V2RayXHTTPXmuxOptions struct {
|
|||||||
CMaxReuseTimes badoption.Range[int] `json:"c_max_reuse_times"`
|
CMaxReuseTimes badoption.Range[int] `json:"c_max_reuse_times"`
|
||||||
HMaxRequestTimes badoption.Range[int] `json:"h_max_request_times"`
|
HMaxRequestTimes badoption.Range[int] `json:"h_max_request_times"`
|
||||||
HMaxReusableSecs badoption.Range[int] `json:"h_max_reusable_secs"`
|
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] {
|
func (m *V2RayXHTTPXmuxOptions) GetNormalizedMaxConcurrency() badoption.Range[int] {
|
||||||
|
|||||||
Reference in New Issue
Block a user