mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-25 04:17:15 +00:00
fix(sub): emit JSON-subscription pinnedPeerCertSha256 as comma-separated string
xray-core now parses tlsSettings.pinnedPeerCertSha256 as a comma-separated string rather than a []string array. The JSON subscription still emitted the array form, which current xray-core-backed v2ray clients reject on import. Join the panel's stored pins into the string form, matching the raw share-link path (pcs/pinSHA256). Fixes #5401.
This commit is contained in:
@@ -297,8 +297,10 @@ func (s *SubJsonService) tlsData(tData map[string]any) map[string]any {
|
||||
if ech, ok := tlsClientSettings["echConfigList"].(string); ok && ech != "" {
|
||||
tlsData["echConfigList"] = ech
|
||||
}
|
||||
if pins, ok := tlsClientSettings["pinnedPeerCertSha256"].([]any); ok && len(pins) > 0 {
|
||||
tlsData["pinnedPeerCertSha256"] = pins
|
||||
// xray-core now parses pinnedPeerCertSha256 as a comma-separated string, not
|
||||
// an array; emit the joined form so v2ray clients can import the config (#5401).
|
||||
if pins, ok := pinnedSha256List(tlsClientSettings); ok {
|
||||
tlsData["pinnedPeerCertSha256"] = strings.Join(pins, ",")
|
||||
}
|
||||
return tlsData
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user