mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5401] [Bug]: pinnedPeerCertSha256 #3780
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3780
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @andyplop9 on GitHub (Jun 17, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5401
Describe the bug
In JSON sub for pinnedPeerCertSha256, it gives it in brackets, and in v2ray clients, it can't be imported. Only with "" is it possible.
How to reproduce the problem
Copy JSON Sub
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.3.1
Xray-core version
No response
How did you install 3x-ui?
Docker / Docker Compose
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 17, 2026):
The JSON subscription service (
internal/sub/json_service.go, lines 291–293) currently emitspinnedPeerCertSha256as a JSON array:This matches the xray-core outbound TLS config format, which declares that field as
[]string. Clients whose JSON parser is backed by xray-core should accept the array form without issue.For the report to be actionable, the following details are needed:
tlsSettingsblock containingpinnedPeerCertSha256.Note: this is a separate issue from #4818, which concerned Hysteria2 share-link
pinSHA256encoding (base64 vs. hex) and was resolved in commitac67c522. The JSON subscription path (json_service.go) is a distinct code path.This reply was generated automatically; a maintainer may follow up.
@andyplop9 commented on GitHub (Jun 17, 2026):
https://github.com/XTLS/Xray-core/pull/5507
github.com/XTLS/Xray-core@dde96f7I found these two
I hope it helps
I believe it is comma separated(
github.com/XTLS/Xray-core@2c92339f95)The actual diff in infra/conf/transport_internet.go shows the before and after side by side. The old code being removed:
config.PinnedPeerCertSha256 = [][]byte{}
// Split by tilde separator
hashes := strings.Split(c.PinnedPeerCertSha256, "~")
for _, v := range hashes {
Replaced with the new code being added:
for v := range strings.SplitSeq(c.PinnedPeerCertSha256, ",") {
@islamsadril770-ux commented on GitHub (Aug 19, 2026):