mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-09 21:00:58 +00:00
feat(sub): Add XHTTP session field compatibility in share links and subscriptions (#5929)
* ✨ Add sessionKey and sessionPlacement compatability for previous clients * ✨ Add sessionKey and sessionPlacement compatability for previous clients on backend
This commit is contained in:
@@ -2017,6 +2017,15 @@ func buildXhttpExtra(xhttp map[string]any) map[string]any {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Older clients still read the pre-#6258 names from the subscription
|
||||
// extra JSON. Emit aliases after lifting legacy inputs so both old and
|
||||
// new clients can consume the same link.
|
||||
if v, ok := extra["sessionIDPlacement"].(string); ok && len(v) > 0 {
|
||||
extra["sessionPlacement"] = v
|
||||
}
|
||||
if v, ok := extra["sessionIDKey"].(string); ok && len(v) > 0 {
|
||||
extra["sessionKey"] = v
|
||||
}
|
||||
|
||||
for _, field := range []string{"uplinkChunkSize"} {
|
||||
if v, ok := nonZeroShareValue(xhttp[field]); ok {
|
||||
|
||||
Reference in New Issue
Block a user