@@ -419,42 +419,6 @@ class WsStreamSettings extends XrayCommonClass {
419
419
}
420
420
}
421
421
422
- class HttpStreamSettings extends XrayCommonClass {
423
- constructor (
424
- path = '/' ,
425
- host = [ '' ] ,
426
- ) {
427
- super ( ) ;
428
- this . path = path ;
429
- this . host = host . length === 0 ? [ '' ] : host ;
430
- }
431
-
432
- addHost ( host ) {
433
- this . host . push ( host ) ;
434
- }
435
-
436
- removeHost ( index ) {
437
- this . host . splice ( index , 1 ) ;
438
- }
439
-
440
- static fromJson ( json = { } ) {
441
- return new HttpStreamSettings ( json . path , json . host ) ;
442
- }
443
-
444
- toJson ( ) {
445
- let host = [ ] ;
446
- for ( let i = 0 ; i < this . host . length ; ++ i ) {
447
- if ( ! ObjectUtil . isEmpty ( this . host [ i ] ) ) {
448
- host . push ( this . host [ i ] ) ;
449
- }
450
- }
451
- return {
452
- path : this . path ,
453
- host : host ,
454
- }
455
- }
456
- }
457
-
458
422
class GrpcStreamSettings extends XrayCommonClass {
459
423
constructor (
460
424
serviceName = "" ,
@@ -958,7 +922,6 @@ class StreamSettings extends XrayCommonClass {
958
922
tcpSettings = new TcpStreamSettings ( ) ,
959
923
kcpSettings = new KcpStreamSettings ( ) ,
960
924
wsSettings = new WsStreamSettings ( ) ,
961
- httpSettings = new HttpStreamSettings ( ) ,
962
925
grpcSettings = new GrpcStreamSettings ( ) ,
963
926
httpupgradeSettings = new HTTPUpgradeStreamSettings ( ) ,
964
927
xhttpSettings = new xHTTPStreamSettings ( ) ,
@@ -973,7 +936,6 @@ class StreamSettings extends XrayCommonClass {
973
936
this . tcp = tcpSettings ;
974
937
this . kcp = kcpSettings ;
975
938
this . ws = wsSettings ;
976
- this . http = httpSettings ;
977
939
this . grpc = grpcSettings ;
978
940
this . httpupgrade = httpupgradeSettings ;
979
941
this . xhttp = xhttpSettings ;
@@ -1023,7 +985,6 @@ class StreamSettings extends XrayCommonClass {
1023
985
TcpStreamSettings . fromJson ( json . tcpSettings ) ,
1024
986
KcpStreamSettings . fromJson ( json . kcpSettings ) ,
1025
987
WsStreamSettings . fromJson ( json . wsSettings ) ,
1026
- HttpStreamSettings . fromJson ( json . httpSettings ) ,
1027
988
GrpcStreamSettings . fromJson ( json . grpcSettings ) ,
1028
989
HTTPUpgradeStreamSettings . fromJson ( json . httpupgradeSettings ) ,
1029
990
xHTTPStreamSettings . fromJson ( json . xhttpSettings ) ,
@@ -1042,7 +1003,6 @@ class StreamSettings extends XrayCommonClass {
1042
1003
tcpSettings : network === 'tcp' ? this . tcp . toJson ( ) : undefined ,
1043
1004
kcpSettings : network === 'kcp' ? this . kcp . toJson ( ) : undefined ,
1044
1005
wsSettings : network === 'ws' ? this . ws . toJson ( ) : undefined ,
1045
- httpSettings : network === 'http' ? this . http . toJson ( ) : undefined ,
1046
1006
grpcSettings : network === 'grpc' ? this . grpc . toJson ( ) : undefined ,
1047
1007
httpupgradeSettings : network === 'httpupgrade' ? this . httpupgrade . toJson ( ) : undefined ,
1048
1008
xhttpSettings : network === 'xhttp' ? this . xhttp . toJson ( ) : undefined ,
@@ -1174,10 +1134,6 @@ class Inbound extends XrayCommonClass {
1174
1134
return this . network === "grpc" ;
1175
1135
}
1176
1136
1177
- get isH2 ( ) {
1178
- return this . network === "http" ;
1179
- }
1180
-
1181
1137
get isHttpupgrade ( ) {
1182
1138
return this . network === "httpupgrade" ;
1183
1139
}
@@ -1222,8 +1178,6 @@ class Inbound extends XrayCommonClass {
1222
1178
return this . getHeader ( this . stream . tcp . request , 'host' ) ;
1223
1179
} else if ( this . isWs ) {
1224
1180
return this . stream . ws . host ?. length > 0 ? this . stream . ws . host : this . getHeader ( this . stream . ws , 'host' ) ;
1225
- } else if ( this . isH2 ) {
1226
- return this . stream . http . host [ 0 ] ;
1227
1181
} else if ( this . isHttpupgrade ) {
1228
1182
return this . stream . httpupgrade . host ?. length > 0 ? this . stream . httpupgrade . host : this . getHeader ( this . stream . httpupgrade , 'host' ) ;
1229
1183
} else if ( this . isXHTTP ) {
@@ -1237,8 +1191,6 @@ class Inbound extends XrayCommonClass {
1237
1191
return this . stream . tcp . request . path [ 0 ] ;
1238
1192
} else if ( this . isWs ) {
1239
1193
return this . stream . ws . path ;
1240
- } else if ( this . isH2 ) {
1241
- return this . stream . http . path ;
1242
1194
} else if ( this . isHttpupgrade ) {
1243
1195
return this . stream . httpupgrade . path ;
1244
1196
} else if ( this . isXHTTP ) {
@@ -1331,10 +1283,6 @@ class Inbound extends XrayCommonClass {
1331
1283
const ws = this . stream . ws ;
1332
1284
obj . path = ws . path ;
1333
1285
obj . host = ws . host ?. length > 0 ? ws . host : this . getHeader ( ws , 'host' ) ;
1334
- } else if ( network === 'http' ) {
1335
- obj . net = 'h2' ;
1336
- obj . path = this . stream . http . path ;
1337
- obj . host = this . stream . http . host . join ( ',' ) ;
1338
1286
} else if ( network === 'grpc' ) {
1339
1287
obj . path = this . stream . grpc . serviceName ;
1340
1288
obj . authority = this . stream . grpc . authority ;
@@ -1400,11 +1348,6 @@ class Inbound extends XrayCommonClass {
1400
1348
params . set ( "path" , ws . path ) ;
1401
1349
params . set ( "host" , ws . host ?. length > 0 ? ws . host : this . getHeader ( ws , 'host' ) ) ;
1402
1350
break ;
1403
- case "http" :
1404
- const http = this . stream . http ;
1405
- params . set ( "path" , http . path ) ;
1406
- params . set ( "host" , http . host ) ;
1407
- break ;
1408
1351
case "grpc" :
1409
1352
const grpc = this . stream . grpc ;
1410
1353
params . set ( "serviceName" , grpc . serviceName ) ;
@@ -1504,11 +1447,6 @@ class Inbound extends XrayCommonClass {
1504
1447
params . set ( "path" , ws . path ) ;
1505
1448
params . set ( "host" , ws . host ?. length > 0 ? ws . host : this . getHeader ( ws , 'host' ) ) ;
1506
1449
break ;
1507
- case "http" :
1508
- const http = this . stream . http ;
1509
- params . set ( "path" , http . path ) ;
1510
- params . set ( "host" , http . host ) ;
1511
- break ;
1512
1450
case "grpc" :
1513
1451
const grpc = this . stream . grpc ;
1514
1452
params . set ( "serviceName" , grpc . serviceName ) ;
@@ -1587,11 +1525,6 @@ class Inbound extends XrayCommonClass {
1587
1525
params . set ( "path" , ws . path ) ;
1588
1526
params . set ( "host" , ws . host ?. length > 0 ? ws . host : this . getHeader ( ws , 'host' ) ) ;
1589
1527
break ;
1590
- case "http" :
1591
- const http = this . stream . http ;
1592
- params . set ( "path" , http . path ) ;
1593
- params . set ( "host" , http . host ) ;
1594
- break ;
1595
1528
case "grpc" :
1596
1529
const grpc = this . stream . grpc ;
1597
1530
params . set ( "serviceName" , grpc . serviceName ) ;
0 commit comments