Skip to content

Commit 74937cd

Browse files
committed
XTLS only supports TLS and REALITY directly for now in V2RaySocks
1 parent 81c068b commit 74937cd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

api/v2raysocks/v2raysocks.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ func (c *APIClient) ParseV2rayNodeResponse(nodeInfoResponse *simplejson.Json) (*
423423
var enableTLS bool
424424
var enableVless bool
425425
var enableReality bool
426+
var vlessFlow string
426427
var alterID uint16 = 0
427428

428429
tmpInboundInfo := nodeInfoResponse.Get("inbounds").MustArray()
@@ -470,6 +471,13 @@ func (c *APIClient) ParseV2rayNodeResponse(nodeInfoResponse *simplejson.Json) (*
470471
}
471472
}
472473

474+
// XTLS only supports TLS and REALITY directly for now
475+
if (transportProtocol == "h2" || transportProtocol == "grpc") && enableReality {
476+
vlessFlow = ""
477+
} else {
478+
vlessFlow = c.VlessFlow
479+
}
480+
473481
// Create GeneralNodeInfo
474482
// AlterID will be updated after next sync
475483
nodeInfo := &api.NodeInfo{
@@ -482,7 +490,7 @@ func (c *APIClient) ParseV2rayNodeResponse(nodeInfoResponse *simplejson.Json) (*
482490
Path: path,
483491
Host: host,
484492
EnableVless: enableVless,
485-
VlessFlow: c.VlessFlow,
493+
VlessFlow: vlessFlow,
486494
ServiceName: serviceName,
487495
Header: header,
488496
EnableREALITY: enableReality,

0 commit comments

Comments
 (0)