|
@@ -446,16 +446,19 @@ class QuicStreamSettings extends XrayCommonClass {
|
|
|
class GrpcStreamSettings extends XrayCommonClass {
|
|
|
constructor(
|
|
|
serviceName="",
|
|
|
+ authority="",
|
|
|
multiMode=false,
|
|
|
) {
|
|
|
super();
|
|
|
this.serviceName = serviceName;
|
|
|
+ this.authority = authority;
|
|
|
this.multiMode = multiMode;
|
|
|
}
|
|
|
|
|
|
static fromJson(json={}) {
|
|
|
return new GrpcStreamSettings(
|
|
|
json.serviceName,
|
|
|
+ json.authority,
|
|
|
json.multiMode
|
|
|
);
|
|
|
}
|
|
@@ -463,6 +466,7 @@ class GrpcStreamSettings extends XrayCommonClass {
|
|
|
toJson() {
|
|
|
return {
|
|
|
serviceName: this.serviceName,
|
|
|
+ authority: this.authority,
|
|
|
multiMode: this.multiMode,
|
|
|
}
|
|
|
}
|
|
@@ -1240,6 +1244,7 @@ class Inbound extends XrayCommonClass {
|
|
|
obj.path = this.stream.quic.key;
|
|
|
} else if (network === 'grpc') {
|
|
|
obj.path = this.stream.grpc.serviceName;
|
|
|
+ obj.authority = this.stream.grpc.authority;
|
|
|
if (this.stream.grpc.multiMode){
|
|
|
obj.type = 'multi'
|
|
|
}
|
|
@@ -1315,6 +1320,7 @@ class Inbound extends XrayCommonClass {
|
|
|
case "grpc":
|
|
|
const grpc = this.stream.grpc;
|
|
|
params.set("serviceName", grpc.serviceName);
|
|
|
+ params.set("authority", grpc.authority);
|
|
|
if(grpc.multiMode){
|
|
|
params.set("mode", "multi");
|
|
|
}
|
|
@@ -1434,6 +1440,7 @@ class Inbound extends XrayCommonClass {
|
|
|
case "grpc":
|
|
|
const grpc = this.stream.grpc;
|
|
|
params.set("serviceName", grpc.serviceName);
|
|
|
+ params.set("authority", grpc.authority);
|
|
|
if(grpc.multiMode){
|
|
|
params.set("mode", "multi");
|
|
|
}
|
|
@@ -1520,6 +1527,7 @@ class Inbound extends XrayCommonClass {
|
|
|
case "grpc":
|
|
|
const grpc = this.stream.grpc;
|
|
|
params.set("serviceName", grpc.serviceName);
|
|
|
+ params.set("authority", grpc.authority);
|
|
|
if(grpc.multiMode){
|
|
|
params.set("mode", "multi");
|
|
|
}
|