mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #6825] [CLOSED] feat(sub): export tls cipher suites as cs query param in share links #6467
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#6467
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6825
Author: @rqzbeh
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:feat/sub-cipher-suites📝 Commits (1)
dbdc1fcfeat(sub): export tls cipher suites as cs query param in share links📊 Changes
10 files changed (+125 additions, -5 deletions)
View changed files
📝
frontend/src/lib/hosts/host-link.ts(+2 -0)📝
frontend/src/lib/xray/inbound-link.ts(+13 -0)📝
frontend/src/pages/hosts/HostFormModal.tsx(+6 -1)📝
frontend/src/schemas/protocols/stream/external-proxy.ts(+1 -0)📝
frontend/src/test/host-link.test.ts(+2 -0)📝
frontend/src/test/inbound-link.test.ts(+27 -0)📝
internal/sub/service.go(+25 -2)📝
internal/sub/service_test.go(+29 -0)📝
internal/util/link/outbound.go(+5 -0)📝
internal/util/link/outbound_helpers_test.go(+15 -2)📄 Description
Summary
Exports custom TLS
cipherSuitesconfigured on inbounds or host overrides as the standardcsquery parameter in VLESS, Trojan, and VMess share links, and parsescsback tocipherSuiteswhen importing links. In the panel UI, the cipher suites field is dynamically disabled when uTLS fingerprint is set to a browser to match client behavior.Why
When custom TLS cipher suites are configured on inbounds or host overrides (e.g. for DPI/censorship evasion and TLS fingerprint customization), 3x-ui included them in JSON subscriptions but omitted them from standard share links (
vless://,trojan://,vmess://). Clients such as v2rayNG, Sing-box, and NekoBox, as well as configuration collectors, expect thecs=parameter to configure custom cipher suites. Additionally, in uTLS, cipher suites only take effect when fingerprint is set tounsafeor none; the UI now disables cipher suite selection when a browser fingerprint is chosen.Type of change
Areas affected
How was this tested?
internal/sub/service_test.goandinternal/util/link/outbound_helpers_test.goverifying:applyShareTLSParamssetsparams["cs"]fromtlsSettings["cipherSuites"].applyExternalProxyTLSParamssetsparams["cs"]from host overrides.ParseLinkdecodescs=back totlsSettings["cipherSuites"].Ran
go test -v ./internal/sub/... ./internal/util/link/...(all 1093 tests pass).frontend/src/test/inbound-link.test.tsandfrontend/src/test/host-link.test.tsverifying thatgenVlessLinkandhostToExternalProxyEntryexport and carrycs. Rannpx vitest run src/test/inbound-link.test.ts src/test/host-link.test.ts(all 84 tests pass).3x-ui:testfrom scratch, ran container, added TLS inbound with customcipherSuitesand host override, and verified that generated share links includecs=TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256.Screenshots / recordings
N/A
Breaking changes
None.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.