mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-02-27 20:53:01 +00:00
Uses provided spiderX value
The update allows the use of a inbound `spx` value from the reality settings for Vless and Trojan links, if one is provided. This provides more flexibility and customization options. Previously, a random `spx` value was always generated. which could override the inbound settings.
This commit is contained in:
parent
d8fb09faae
commit
9a79cffc2d
1 changed files with 10 additions and 2 deletions
|
|
@ -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, "spiderX"); 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, "spiderX"); ok {
|
||||
if spx, ok := spxValue.(string); ok && len(spx) > 0 {
|
||||
params["spx"] = spx
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue