[GH-ISSUE #6061] [Feature]: Add Reality for ShadowSocks in UI #4194

Open
opened 2026-10-31 20:37:52 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Major-Woolfi on GitHub (Jul 20, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6061

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.

Image

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?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
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. <img width="1080" height="1545" alt="Image" src="https://github.com/user-attachments/assets/8f942357-9bff-416a-ba39-83bb9b1383fe" /> [ShadowSocks+XHTTP+Reality (SNI yandex.net).json](https://github.com/user-attachments/files/30197510/ShadowSocks%2BXHTTP%2BReality.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? - [ ] I'd like to implement this feature myself and open a PR. - [x] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
Author
Owner

@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] in frontend/src/lib/xray/protocol-capabilities.ts, used by canEnableReality(). frontend/src/pages/inbounds/form/InboundFormModal.tsx only renders the Reality radio button when canEnableReality(...) returns true, so for protocol === "shadowsocks" it never appears. This exclusion is locked in by a regression snapshot (protocol-capabilities.test.ts.snap, cases shadowsocks-2022 :: tcp/reality and shadowsocks-2022 :: xhttp/reality), both asserting canEnableReality: false while canEnableTls: true — so it is intentional, tested behavior, not an oversight.

It is a UI-only restriction, not something enforced elsewhere in the stack:

  • The Zod schema that defines the wire format (frontend/src/schemas/protocols/security/index.ts) validates the shape of security/realitySettings but has no rule tying it to protocol.
  • The Go backend does not special-case it either: in internal/web/service/inbound.go, normalizeStreamSettings keeps streamSettings for Shadowsocks inbounds as-is, and internal/xray stores/forwards StreamSettings as a raw, protocol-agnostic JSON blob. The one Reality-specific backend check, validateFinalMaskRealityCombo (same file), rejects finalmask.tcp combined with security: "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:

  • Adding shadowsocks to REALITY_ELIGIBLE_PROTOCOLS (the transport allowlist REALITY_NETWORKS already includes xhttp).
  • A Reality branch in the Shadowsocks share-link generator, genShadowsocksLink() in frontend/src/lib/xray/inbound-link.ts. It currently only handles security === "tls"; unlike genTrojanLink(), it never calls a Reality param writer, so generated ss:// links would not carry pbk/sid/fp/sni yet even if the inbound saved correctly.

Separately, whether the pinned Xray-core build (github.com/xtls/xray-core v1.260327.1-0.20260711155151-50231eaff98c, per go.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.

<!-- gh-comment-id:5024999626 --> @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]` in `frontend/src/lib/xray/protocol-capabilities.ts`, used by `canEnableReality()`. `frontend/src/pages/inbounds/form/InboundFormModal.tsx` only renders the Reality radio button when `canEnableReality(...)` returns true, so for `protocol === "shadowsocks"` it never appears. This exclusion is locked in by a regression snapshot (`protocol-capabilities.test.ts.snap`, cases `shadowsocks-2022 :: tcp/reality` and `shadowsocks-2022 :: xhttp/reality`), both asserting `canEnableReality: false` while `canEnableTls: true` — so it is intentional, tested behavior, not an oversight. It is a UI-only restriction, not something enforced elsewhere in the stack: - The Zod schema that defines the wire format (`frontend/src/schemas/protocols/security/index.ts`) validates the shape of `security`/`realitySettings` but has no rule tying it to `protocol`. - The Go backend does not special-case it either: in `internal/web/service/inbound.go`, `normalizeStreamSettings` keeps `streamSettings` for Shadowsocks inbounds as-is, and `internal/xray` stores/forwards `StreamSettings` as a raw, protocol-agnostic JSON blob. The one Reality-specific backend check, `validateFinalMaskRealityCombo` (same file), rejects `finalmask.tcp` combined with `security: "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: - Adding `shadowsocks` to `REALITY_ELIGIBLE_PROTOCOLS` (the transport allowlist `REALITY_NETWORKS` already includes `xhttp`). - A Reality branch in the Shadowsocks share-link generator, `genShadowsocksLink()` in `frontend/src/lib/xray/inbound-link.ts`. It currently only handles `security === "tls"`; unlike `genTrojanLink()`, it never calls a Reality param writer, so generated `ss://` links would not carry `pbk`/`sid`/`fp`/`sni` yet even if the inbound saved correctly. Separately, whether the pinned Xray-core build (`github.com/xtls/xray-core v1.260327.1-0.20260711155151-50231eaff98c`, per `go.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.*
Author
Owner

@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.

<!-- gh-comment-id:5025267845 --> @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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4194
No description provided.