From ccbd5c6a0dbd645fc1540529db1de03e378d3072 Mon Sep 17 00:00:00 2001 From: Ilya05228 Date: Thu, 28 Aug 2025 16:52:27 +0300 Subject: [PATCH] fix: SpiderX --- sub/subService.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sub/subService.go b/sub/subService.go index dfb0863e..d831b192 100644 --- a/sub/subService.go +++ b/sub/subService.go @@ -442,7 +442,11 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string { params["pqv"] = pqv } } - params["spx"] = "/" + random.Seq(15) + if spxValue, ok := searchKey(realitySettings, "spiderX"); ok { + if spx, ok := spxValue.(string); ok && len(spx) > 0 { + params["spx"] = spx + } + } } if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 { @@ -637,7 +641,11 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string params["pqv"] = pqv } } - params["spx"] = "/" + random.Seq(15) + if spxValue, ok := searchKey(realitySettings, "spiderX"); ok { + if spx, ok := spxValue.(string); ok && len(spx) > 0 { + params["spx"] = spx + } + } } if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 {