[GH-ISSUE #5961] [Feature]: Naive client support already implemented and ready for upstream PR (low-maintenance SOCKS5-based integration) #4134

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

Originally created by @atem32 on GitHub (Jul 14, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5961

There is currently no upstream Naive client support in 3x-ui mainline, while this functionality has already been implemented and validated locally.

So the remaining problem is not implementation feasibility, but upstream integration of an already completed solution.

Describe the solution you'd like

Naive client support is already implemented and ready to be proposed as a PR.

Current implementation is based on standard panel patterns and is intentionally low-maintenance:

  1. Already implemented
  • Backend/API lifecycle management for Naive (install/uninstall/start-stop/restart/version flow).
  • JSON config generation pipeline adapted for Naive client.
  • SOCKS5 bridge integration so panel routing/probe logic uses standard outbound path.
  • Frontend controls integrated with existing panel components.
  • Localization updates and test coverage for sync behavior.
  1. Maintenance profile is minimal
  • Input command/config schema used by Naive client is stable and does not significantly change across versions.
  • Most protocol complexity is handled inside the Naive client itself.
  • Panel-side responsibility is limited: manage process lifecycle and consume the exposed SOCKS5 endpoint as outbound.
  • This keeps panel logic thin and reduces long-term upkeep risk.
  1. Request
  • Please review and accept this already completed implementation as upstream PR (single PR or split series, based on maintainer preference).

Alternatives you've considered

  • Keep this only in a private fork:
    causes long-term divergence and repetitive maintenance.

  • Rebuild from scratch upstream:
    unnecessary since a working implementation already exists.

  • Create a heavy custom integration layer:
    unnecessary because Naive internals are already encapsulated in the client, and panel only needs lifecycle + SOCKS5 usage.

Concrete use case

Production operator workflow with the already implemented approach:

  1. Operator installs and manages Naive from existing panel-style actions.
  2. Panel generates Naive-compatible config and starts the client.
  3. Naive client handles its internal protocol behavior.
  4. Panel routes traffic through the client’s SOCKS5 endpoint as outbound.
  5. Version updates require little panel-side change because commands/config interface remains stable.

Result:

  • practical upstream-ready feature,
  • minimal panel maintenance burden,
  • consistent operations with existing 3x-ui architecture.

Mockups, screenshots, or examples

Image Image Image Image Image

Which parts of the panel would this affect?

Backend (API endpoints, login, settings)

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 @atem32 on GitHub (Jul 14, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5961 ### Is your feature request related to a problem? There is currently no upstream Naive client support in 3x-ui mainline, while this functionality has already been implemented and validated locally. So the remaining problem is not implementation feasibility, but upstream integration of an already completed solution. ### Describe the solution you'd like Naive client support is already implemented and ready to be proposed as a PR. Current implementation is based on standard panel patterns and is intentionally low-maintenance: 1. Already implemented - Backend/API lifecycle management for Naive (install/uninstall/start-stop/restart/version flow). - JSON config generation pipeline adapted for Naive client. - SOCKS5 bridge integration so panel routing/probe logic uses standard outbound path. - Frontend controls integrated with existing panel components. - Localization updates and test coverage for sync behavior. 2. Maintenance profile is minimal - Input command/config schema used by Naive client is stable and does not significantly change across versions. - Most protocol complexity is handled inside the Naive client itself. - Panel-side responsibility is limited: manage process lifecycle and consume the exposed SOCKS5 endpoint as outbound. - This keeps panel logic thin and reduces long-term upkeep risk. 3. Request - Please review and accept this already completed implementation as upstream PR (single PR or split series, based on maintainer preference). ### Alternatives you've considered - Keep this only in a private fork: causes long-term divergence and repetitive maintenance. - Rebuild from scratch upstream: unnecessary since a working implementation already exists. - Create a heavy custom integration layer: unnecessary because Naive internals are already encapsulated in the client, and panel only needs lifecycle + SOCKS5 usage. ### Concrete use case Production operator workflow with the already implemented approach: 1. Operator installs and manages Naive from existing panel-style actions. 2. Panel generates Naive-compatible config and starts the client. 3. Naive client handles its internal protocol behavior. 4. Panel routes traffic through the client’s SOCKS5 endpoint as outbound. 5. Version updates require little panel-side change because commands/config interface remains stable. Result: - practical upstream-ready feature, - minimal panel maintenance burden, - consistent operations with existing 3x-ui architecture. ### Mockups, screenshots, or examples <img width="782" height="143" alt="Image" src="https://github.com/user-attachments/assets/707b3cae-5ff3-409c-9587-71db3eae15ea" /> <img width="793" height="146" alt="Image" src="https://github.com/user-attachments/assets/711e8c49-e5d1-4af8-9822-8daf9766e90e" /> <img width="685" height="653" alt="Image" src="https://github.com/user-attachments/assets/53b65361-664a-4fdb-b013-c8165a9417ae" /> <img width="961" height="830" alt="Image" src="https://github.com/user-attachments/assets/cbde6d3a-c157-4875-b8c6-02ba6e616cfa" /> <img width="1577" height="101" alt="Image" src="https://github.com/user-attachments/assets/aa287705-2c48-463e-a4e5-06bd9cfc86ac" /> ### Which parts of the panel would this affect? Backend (API endpoints, login, settings) ### Are you willing to help? - [x] I'd like to implement this feature myself and open a PR. - [ ] 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 14, 2026):

This exact request (Naive / NaiveProxy client support) has been raised twice before, in #4038 and #4826 — the latter closed explicitly as a duplicate of the former. A case-insensitive search of the current source tree for "naive" returns no matches, so nothing from those threads has landed in main; #4038 was closed by @MHSanaei with the state reason "completed," but that closure isn't backed by any merged code or linked PR.

Since this issue is framed as an architecture proposal rather than a plain feature ask, here is what the current source actually supports for it, and what it doesn't:

  • The SOCKS5-outbound half already exists. Xray outbounds are stored as free-form JSON (OutboundConfigs json_util.RawMessage, internal/xray/config.go:16), and socks is already a first-class outbound protocol end-to-end — backend address/port handling (internal/web/service/outbound/outbound.go:277), a dedicated Zod schema (frontend/src/schemas/protocols/outbound/socks.ts), and a form wired into the Outbounds tab (frontend/src/pages/xray/outbounds/protocols/socks.tsx). An admin can already point an Xray outbound at any SOCKS5 listener today, including one an external Naive process exposes — no panel change is needed for that part of the design.
  • A first-class Naive inbound (lifecycle, DB model, panel UI) is a larger surface than "thin." Inbound protocols are a closed Go enum (model.Protocol, internal/database/model/model.go:24-35: vmess/vless/tunnel/http/trojan/shadowsocks/mixed/wireguard/hysteria/mtproto) switched over roughly 25 times across 5 files — internal/web/service/xray.go, inbound_clients.go, client_crud.go, port_conflict.go, internal/sub/clash_service.go — for client-ID generation, link building, port-conflict checks, and Clash export. That said, the general shape is precedented: MTProto is handled the same way this proposal describes, as a separate managed sidecar (mtg-multi, since Xray-core has no native mtproto protocol — see the package comment at internal/mtproto/process.go:1-8), with its own lifecycle manager (internal/mtproto/manager.go) that hot-applies client changes over the sidecar's loopback management API (PUT /secrets, manager.go:676-701) and falls back to a restart otherwise. docs/architecture.md already documents the panel supervising two child processes (Xray-core and mtg-multi); a third, for Naive, would extend an existing pattern rather than introduce a new one.

None of that is an assessment of your actual patch, because none was linked — the issue includes a description and five screenshots but no branch, fork, or PR/diff. Per CONTRIBUTING.md's "Sending a pull request" section, review happens against real code on a branch off main. The direct path to a decision from @MHSanaei is to open that PR (or link the working branch/fork) so it can be judged on the actual implementation — splitting it so the inbound lifecycle/DB/UI portion is reviewable separately from any outbound-routing wiring would match the size difference between those two pieces noted above.

This reply was generated automatically and a maintainer may follow up.

<!-- gh-comment-id:4975150229 --> @github-actions[bot] commented on GitHub (Jul 14, 2026): This exact request (Naive / NaiveProxy client support) has been raised twice before, in #4038 and #4826 — the latter closed explicitly as a duplicate of the former. A case-insensitive search of the current source tree for "naive" returns no matches, so nothing from those threads has landed in `main`; #4038 was closed by @MHSanaei with the state reason "completed," but that closure isn't backed by any merged code or linked PR. Since this issue is framed as an architecture proposal rather than a plain feature ask, here is what the current source actually supports for it, and what it doesn't: - **The SOCKS5-outbound half already exists.** Xray outbounds are stored as free-form JSON (`OutboundConfigs json_util.RawMessage`, `internal/xray/config.go:16`), and `socks` is already a first-class outbound protocol end-to-end — backend address/port handling (`internal/web/service/outbound/outbound.go:277`), a dedicated Zod schema (`frontend/src/schemas/protocols/outbound/socks.ts`), and a form wired into the Outbounds tab (`frontend/src/pages/xray/outbounds/protocols/socks.tsx`). An admin can already point an Xray outbound at any SOCKS5 listener today, including one an external Naive process exposes — no panel change is needed for that part of the design. - **A first-class Naive inbound (lifecycle, DB model, panel UI) is a larger surface than "thin."** Inbound protocols are a closed Go enum (`model.Protocol`, `internal/database/model/model.go:24-35`: vmess/vless/tunnel/http/trojan/shadowsocks/mixed/wireguard/hysteria/mtproto) switched over roughly 25 times across 5 files — `internal/web/service/xray.go`, `inbound_clients.go`, `client_crud.go`, `port_conflict.go`, `internal/sub/clash_service.go` — for client-ID generation, link building, port-conflict checks, and Clash export. That said, the general shape is precedented: MTProto is handled the same way this proposal describes, as a separate managed sidecar (`mtg-multi`, since Xray-core has no native mtproto protocol — see the package comment at `internal/mtproto/process.go:1-8`), with its own lifecycle manager (`internal/mtproto/manager.go`) that hot-applies client changes over the sidecar's loopback management API (`PUT /secrets`, `manager.go:676-701`) and falls back to a restart otherwise. `docs/architecture.md` already documents the panel supervising two child processes (Xray-core and `mtg-multi`); a third, for Naive, would extend an existing pattern rather than introduce a new one. None of that is an assessment of your actual patch, because none was linked — the issue includes a description and five screenshots but no branch, fork, or PR/diff. Per `CONTRIBUTING.md`'s "Sending a pull request" section, review happens against real code on a branch off `main`. The direct path to a decision from @MHSanaei is to open that PR (or link the working branch/fork) so it can be judged on the actual implementation — splitting it so the inbound lifecycle/DB/UI portion is reviewable separately from any outbound-routing wiring would match the size difference between those two pieces noted above. *This reply was generated automatically and a maintainer may follow up.*
Author
Owner

@atem32 commented on GitHub (Jul 15, 2026):

Implementation is now available for review in PR: https://github.com/MHSanaei/3x-ui/pull/5962

<!-- gh-comment-id:4975372399 --> @atem32 commented on GitHub (Jul 15, 2026): Implementation is now available for review in PR: https://github.com/MHSanaei/3x-ui/pull/5962
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#4134
No description provided.