mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6061] [Feature]: Add Reality for ShadowSocks in UI #4194
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#4194
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 @Major-Woolfi on GitHub (Jul 20, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6061
Is your feature request related to a problem?
Yes, the client applications, as well as the XRay core, work perfectly well with ShadowSocks + Reality, but it is not possible to make this combination due to the lack of a corresponding tab in the "Security" section.
Describe the solution you'd like
Please add the "Reality" section to the "Security" tab of the ShadowSocks protocol.
Alternatives you've considered
Through experience (including a bug) I have found that client applications (in particular, INCY) work perfectly with ShadowSocks in conjunction with Reality. XRay-core also does not produce any errors on either the client or the server.
Concrete use case
This feature will help many people regain the glory of the ShadowSocks protocol, as it still works perfectly in this configuration.
Mockups, screenshots, or examples
The solution's functionality is demonstrated in the screenshots and the attached configuration.
ShadowSocks+XHTTP+Reality (SNI yandex.net).json
Also, here's a link to my repository with configurations (it includes a Python generator for 32 and 16 HEX, as well as all my well-working configurations, including this one: https://github.com/Major-Woolfi/3X-UI-Configs
Which parts of the panel would this affect?
Frontend (UI / panel pages)
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jul 20, 2026):
Confirmed: today the Security tab only offers Reality for VLESS and Trojan; Shadowsocks is deliberately excluded rather than missing by accident.
The gate is
REALITY_ELIGIBLE_PROTOCOLS = [vless, trojan]infrontend/src/lib/xray/protocol-capabilities.ts, used bycanEnableReality().frontend/src/pages/inbounds/form/InboundFormModal.tsxonly renders the Reality radio button whencanEnableReality(...)returns true, so forprotocol === "shadowsocks"it never appears. This exclusion is locked in by a regression snapshot (protocol-capabilities.test.ts.snap, casesshadowsocks-2022 :: tcp/realityandshadowsocks-2022 :: xhttp/reality), both assertingcanEnableReality: falsewhilecanEnableTls: true— so it is intentional, tested behavior, not an oversight.It is a UI-only restriction, not something enforced elsewhere in the stack:
frontend/src/schemas/protocols/security/index.ts) validates the shape ofsecurity/realitySettingsbut has no rule tying it toprotocol.internal/web/service/inbound.go,normalizeStreamSettingskeepsstreamSettingsfor Shadowsocks inbounds as-is, andinternal/xraystores/forwardsStreamSettingsas a raw, protocol-agnostic JSON blob. The one Reality-specific backend check,validateFinalMaskRealityCombo(same file), rejectsfinalmask.tcpcombined withsecurity: "reality"regardless of protocol — it is not a per-protocol gate.So implementing this is more than flipping one allowlist entry. At minimum it would also need:
shadowsockstoREALITY_ELIGIBLE_PROTOCOLS(the transport allowlistREALITY_NETWORKSalready includesxhttp).genShadowsocksLink()infrontend/src/lib/xray/inbound-link.ts. It currently only handlessecurity === "tls"; unlikegenTrojanLink(), it never calls a Reality param writer, so generatedss://links would not carrypbk/sid/fp/sniyet even if the inbound saved correctly.Separately, whether the pinned Xray-core build (
github.com/xtls/xray-core v1.260327.1-0.20260711155151-50231eaff98c, pergo.mod) fully supports Shadowsocks+REALITY at the protocol level is not something this repo lets me confirm directly (no vendored source available to inspect) — that would need checking against xray-core itself, independent of the panel change.For context, #3204 requested the same underlying decoupling in 2025 ("Reality is bound to VLESS ... allow Shadowsocks, VMess, Trojan, and SOCKS"). Trojan has since been added to the eligible list; Shadowsocks, VMess, and SOCKS have not, so this is effectively the next step of that ask, scoped specifically to Shadowsocks.
@MHSanaei for a call on whether to accept this into the backlog.
This reply was generated automatically; a maintainer may follow up.
@Major-Woolfi commented on GitHub (Jul 20, 2026):
Great. Thank you for the clarification. In that case, I now have a fairly complete picture of the situation. If any of the developers would like to get in touch with me, I can make the necessary edits and give a PR. Please let me know if you would like to have some help with implementing this feature and if you think I am competent enough to do so.