Quellcode durchsuchen

[sub] fix grpc authority failure

Co-Authored-By: Alireza Ahmadi <[email protected]>
mhsanaei vor 11 Monaten
Ursprung
Commit
21d988133e
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      sub/subService.go

+ 3 - 3
sub/subService.go

@@ -357,7 +357,7 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {
 	case "grpc":
 		grpc, _ := stream["grpcSettings"].(map[string]interface{})
 		params["serviceName"] = grpc["serviceName"].(string)
-		params["authority"] = grpc["authority"].(string)
+		params["authority"], _ = grpc["authority"].(string)
 		if grpc["multiMode"].(bool) {
 			params["mode"] = "multi"
 		}
@@ -574,7 +574,7 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string
 	case "grpc":
 		grpc, _ := stream["grpcSettings"].(map[string]interface{})
 		params["serviceName"] = grpc["serviceName"].(string)
-		params["authority"] = grpc["authority"].(string)
+		params["authority"], _ = grpc["authority"].(string)
 		if grpc["multiMode"].(bool) {
 			params["mode"] = "multi"
 		}
@@ -792,7 +792,7 @@ func (s *SubService) genShadowsocksLink(inbound *model.Inbound, email string) st
 	case "grpc":
 		grpc, _ := stream["grpcSettings"].(map[string]interface{})
 		params["serviceName"] = grpc["serviceName"].(string)
-		params["authority"] = grpc["authority"].(string)
+		params["authority"], _ = grpc["authority"].(string)
 		if grpc["multiMode"].(bool) {
 			params["mode"] = "multi"
 		}