mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-02-28 05:02:59 +00:00
Uses inbound spx value if available.
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
670710a084
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["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 {
|
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["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 {
|
if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue