@@ -525,7 +525,7 @@ class HTTPUpgradeStreamSettings extends XrayCommonClass {
525
525
}
526
526
}
527
527
528
- class SplitHTTPStreamSettings extends XrayCommonClass {
528
+ class xHTTPStreamSettings extends XrayCommonClass {
529
529
constructor (
530
530
path = '/' ,
531
531
host = '' ,
@@ -567,7 +567,7 @@ class SplitHTTPStreamSettings extends XrayCommonClass {
567
567
}
568
568
569
569
static fromJson ( json = { } ) {
570
- return new SplitHTTPStreamSettings (
570
+ return new xHTTPStreamSettings (
571
571
json . path ,
572
572
json . host ,
573
573
XrayCommonClass . toHeaders ( json . headers ) ,
@@ -961,7 +961,7 @@ class StreamSettings extends XrayCommonClass {
961
961
httpSettings = new HttpStreamSettings ( ) ,
962
962
grpcSettings = new GrpcStreamSettings ( ) ,
963
963
httpupgradeSettings = new HTTPUpgradeStreamSettings ( ) ,
964
- splithttpSettings = new SplitHTTPStreamSettings ( ) ,
964
+ xhttpSettings = new xHTTPStreamSettings ( ) ,
965
965
sockopt = undefined ,
966
966
) {
967
967
super ( ) ;
@@ -976,7 +976,7 @@ class StreamSettings extends XrayCommonClass {
976
976
this . http = httpSettings ;
977
977
this . grpc = grpcSettings ;
978
978
this . httpupgrade = httpupgradeSettings ;
979
- this . splithttp = splithttpSettings ;
979
+ this . xhttp = xhttpSettings ;
980
980
this . sockopt = sockopt ;
981
981
}
982
982
@@ -1026,7 +1026,7 @@ class StreamSettings extends XrayCommonClass {
1026
1026
HttpStreamSettings . fromJson ( json . httpSettings ) ,
1027
1027
GrpcStreamSettings . fromJson ( json . grpcSettings ) ,
1028
1028
HTTPUpgradeStreamSettings . fromJson ( json . httpupgradeSettings ) ,
1029
- SplitHTTPStreamSettings . fromJson ( json . splithttpSettings ) ,
1029
+ xHTTPStreamSettings . fromJson ( json . xhttpSettings ) ,
1030
1030
SockoptStreamSettings . fromJson ( json . sockopt ) ,
1031
1031
) ;
1032
1032
}
@@ -1045,7 +1045,7 @@ class StreamSettings extends XrayCommonClass {
1045
1045
httpSettings : network === 'http' ? this . http . toJson ( ) : undefined ,
1046
1046
grpcSettings : network === 'grpc' ? this . grpc . toJson ( ) : undefined ,
1047
1047
httpupgradeSettings : network === 'httpupgrade' ? this . httpupgrade . toJson ( ) : undefined ,
1048
- splithttpSettings : network === 'splithttp ' ? this . splithttp . toJson ( ) : undefined ,
1048
+ xhttpSettings : network === 'xhttp ' ? this . xhttp . toJson ( ) : undefined ,
1049
1049
sockopt : this . sockopt != undefined ? this . sockopt . toJson ( ) : undefined ,
1050
1050
} ;
1051
1051
}
@@ -1182,8 +1182,8 @@ class Inbound extends XrayCommonClass {
1182
1182
return this . network === "httpupgrade" ;
1183
1183
}
1184
1184
1185
- get isSplithttp ( ) {
1186
- return this . network === "splithttp " ;
1185
+ get isXHTTP ( ) {
1186
+ return this . network === "xhttp " ;
1187
1187
}
1188
1188
1189
1189
// Shadowsocks
@@ -1226,8 +1226,8 @@ class Inbound extends XrayCommonClass {
1226
1226
return this . stream . http . host [ 0 ] ;
1227
1227
} else if ( this . isHttpupgrade ) {
1228
1228
return this . stream . httpupgrade . host ?. length > 0 ? this . stream . httpupgrade . host : this . getHeader ( this . stream . httpupgrade , 'host' ) ;
1229
- } else if ( this . isSplithttp ) {
1230
- return this . stream . splithttp . host ?. length > 0 ? this . stream . splithttp . host : this . getHeader ( this . stream . splithttp , 'host' ) ;
1229
+ } else if ( this . isXHTTP ) {
1230
+ return this . stream . xhttp . host ?. length > 0 ? this . stream . xhttp . host : this . getHeader ( this . stream . xhttp , 'host' ) ;
1231
1231
}
1232
1232
return null ;
1233
1233
}
@@ -1241,8 +1241,8 @@ class Inbound extends XrayCommonClass {
1241
1241
return this . stream . http . path ;
1242
1242
} else if ( this . isHttpupgrade ) {
1243
1243
return this . stream . httpupgrade . path ;
1244
- } else if ( this . isSplithttp ) {
1245
- return this . stream . splithttp . path ;
1244
+ } else if ( this . isXHTTP ) {
1245
+ return this . stream . xhttp . path ;
1246
1246
}
1247
1247
return null ;
1248
1248
}
@@ -1266,7 +1266,7 @@ class Inbound extends XrayCommonClass {
1266
1266
1267
1267
canEnableTls ( ) {
1268
1268
if ( ! [ Protocols . VMESS , Protocols . VLESS , Protocols . TROJAN , Protocols . SHADOWSOCKS ] . includes ( this . protocol ) ) return false ;
1269
- return [ "tcp" , "ws" , "http" , "grpc" , "httpupgrade" , "splithttp " ] . includes ( this . network ) ;
1269
+ return [ "tcp" , "ws" , "http" , "grpc" , "httpupgrade" , "xhttp " ] . includes ( this . network ) ;
1270
1270
}
1271
1271
1272
1272
//this is used for xtls-rprx-vision
@@ -1279,7 +1279,7 @@ class Inbound extends XrayCommonClass {
1279
1279
1280
1280
canEnableReality ( ) {
1281
1281
if ( ! [ Protocols . VLESS , Protocols . TROJAN ] . includes ( this . protocol ) ) return false ;
1282
- return [ "tcp" , "http" , "grpc" , "splithttp " ] . includes ( this . network ) ;
1282
+ return [ "tcp" , "http" , "grpc" , "xhttp " ] . includes ( this . network ) ;
1283
1283
}
1284
1284
1285
1285
canEnableStream ( ) {
@@ -1345,11 +1345,11 @@ class Inbound extends XrayCommonClass {
1345
1345
const httpupgrade = this . stream . httpupgrade ;
1346
1346
obj . path = httpupgrade . path ;
1347
1347
obj . host = httpupgrade . host ?. length > 0 ? httpupgrade . host : this . getHeader ( httpupgrade , 'host' ) ;
1348
- } else if ( network === 'splithttp ' ) {
1349
- const splithttp = this . stream . splithttp ;
1350
- obj . path = splithttp . path ;
1351
- obj . host = splithttp . host ?. length > 0 ? splithttp . host : this . getHeader ( splithttp , 'host' ) ;
1352
- obj . mode = splithttp . mode ;
1348
+ } else if ( network === 'xhttp ' ) {
1349
+ const xhttp = this . stream . xhttp ;
1350
+ obj . path = xhttp . path ;
1351
+ obj . host = xhttp . host ?. length > 0 ? xhttp . host : this . getHeader ( xhttp , 'host' ) ;
1352
+ obj . mode = xhttp . mode ;
1353
1353
}
1354
1354
1355
1355
if ( security === 'tls' ) {
@@ -1418,11 +1418,11 @@ class Inbound extends XrayCommonClass {
1418
1418
params . set ( "path" , httpupgrade . path ) ;
1419
1419
params . set ( "host" , httpupgrade . host ?. length > 0 ? httpupgrade . host : this . getHeader ( httpupgrade , 'host' ) ) ;
1420
1420
break ;
1421
- case "splithttp " :
1422
- const splithttp = this . stream . splithttp ;
1423
- params . set ( "path" , splithttp . path ) ;
1424
- params . set ( "host" , splithttp . host ?. length > 0 ? splithttp . host : this . getHeader ( splithttp , 'host' ) ) ;
1425
- params . set ( "mode" , splithttp . mode ) ;
1421
+ case "xhttp " :
1422
+ const xhttp = this . stream . xhttp ;
1423
+ params . set ( "path" , xhttp . path ) ;
1424
+ params . set ( "host" , xhttp . host ?. length > 0 ? xhttp . host : this . getHeader ( xhttp , 'host' ) ) ;
1425
+ params . set ( "mode" , xhttp . mode ) ;
1426
1426
break ;
1427
1427
}
1428
1428
@@ -1522,11 +1522,11 @@ class Inbound extends XrayCommonClass {
1522
1522
params . set ( "path" , httpupgrade . path ) ;
1523
1523
params . set ( "host" , httpupgrade . host ?. length > 0 ? httpupgrade . host : this . getHeader ( httpupgrade , 'host' ) ) ;
1524
1524
break ;
1525
- case "splithttp " :
1526
- const splithttp = this . stream . splithttp ;
1527
- params . set ( "path" , splithttp . path ) ;
1528
- params . set ( "host" , splithttp . host ?. length > 0 ? splithttp . host : this . getHeader ( splithttp , 'host' ) ) ;
1529
- params . set ( "mode" , splithttp . mode ) ;
1525
+ case "xhttp " :
1526
+ const xhttp = this . stream . xhttp ;
1527
+ params . set ( "path" , xhttp . path ) ;
1528
+ params . set ( "host" , xhttp . host ?. length > 0 ? xhttp . host : this . getHeader ( xhttp , 'host' ) ) ;
1529
+ params . set ( "mode" , xhttp . mode ) ;
1530
1530
break ;
1531
1531
}
1532
1532
@@ -1605,11 +1605,11 @@ class Inbound extends XrayCommonClass {
1605
1605
params . set ( "path" , httpupgrade . path ) ;
1606
1606
params . set ( "host" , httpupgrade . host ?. length > 0 ? httpupgrade . host : this . getHeader ( httpupgrade , 'host' ) ) ;
1607
1607
break ;
1608
- case "splithttp " :
1609
- const splithttp = this . stream . splithttp ;
1610
- params . set ( "path" , splithttp . path ) ;
1611
- params . set ( "host" , splithttp . host ?. length > 0 ? splithttp . host : this . getHeader ( splithttp , 'host' ) ) ;
1612
- params . set ( "mode" , splithttp . mode ) ;
1608
+ case "xhttp " :
1609
+ const xhttp = this . stream . xhttp ;
1610
+ params . set ( "path" , xhttp . path ) ;
1611
+ params . set ( "host" , xhttp . host ?. length > 0 ? xhttp . host : this . getHeader ( xhttp , 'host' ) ) ;
1612
+ params . set ( "mode" , xhttp . mode ) ;
1613
1613
break ;
1614
1614
}
1615
1615
0 commit comments