diff --git a/sub/subService.go b/sub/subService.go index e046ebb4..11ecb93a 100644 --- a/sub/subService.go +++ b/sub/subService.go @@ -469,7 +469,11 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string { params["pqv"] = pqv } } - params["spx"] = "/" + random.Seq(15) + if spxValue, ok := searchKey(realitySettings, "spx"); ok { + if spx, ok := spxValue.(string); ok && len(spx) > 0 { + params["spx"] = spx + } + } } if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 { @@ -666,7 +670,11 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string params["pqv"] = pqv } } - params["spx"] = "/" + random.Seq(15) + if spxValue, ok := searchKey(realitySettings, "spx"); ok { + if spx, ok := spxValue.(string); ok && len(spx) > 0 { + params["spx"] = spx + } + } } if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 {