Skip to content

feat: complete CipherSuites support - share links, VMess QR code, sing-box TLS - #3

Merged
patterniha merged 1 commit into
masterfrom
feat/cipher-suites-share-link
Jul 10, 2026
Merged

feat: complete CipherSuites support - share links, VMess QR code, sing-box TLS#3
patterniha merged 1 commit into
masterfrom
feat/cipher-suites-share-link

Conversation

@patterniha

@patterniha patterniha commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Follow-up to #1/#2, and the v2rayN counterpart of patterniha/PattNG#3. Completes CipherSuites support everywhere Fingerprint/Alpn are handled.

What changed

Share-link / QR-code round-trip — the fork already round-trips its custom TLS fields (ech, vcn, pcs, pqv) but CipherSuites was missing, so sharing a profile silently dropped it:

  • BaseFmt.ToUriQuery: exports a cs query parameter inside the TLS-only block alongside alpn (cipher suites don't apply to REALITY).
  • BaseFmt.ResolveUriQuery: imports cs for all URL-based protocols.
  • VmessQRCode + VmessFmt: cs field mapped in both directions.
  • The cs key matches the v2rayNG fork (feat: round-trip cipherSuites in share links and VMess QR code PattNG#3), so links interop between the two clients.

sing-box core support — sing-box supports cipher_suites on outbound TLS (a list of the same Go TLS names Xray takes as a colon-separated string), so the setting no longer silently does nothing on the sing-box core:

  • Tls4Sbox: new cipher_suites field.
  • SingboxOutboundService.GenOutboundTls: maps the stored string (split on : or ,) in the TLS branch only; REALITY uses uTLS where cipher suites don't apply.

Notes for reviewers

  • Sites audited and deliberately left alone: ToUriQueryLite (used by Hysteria2/TUIC links, which follow their ecosystem's standard params), CompareProfileItem (excludes manual-only fields by convention), and the TUIC alpn default in ConfigHandler (protocol-specific).
  • sing-box ignores cipher_suites for TLS 1.3 per its docs; that's inherent to the option.
  • ServiceLib builds cleanly (0 warnings, 0 errors).

🤖 Generated with Claude Code

The fork already round-trips its custom TLS fields (ech, vcn, pcs, pqv)
through share-link query parameters and the VMess QR-code JSON, but
CipherSuites was missing, so sharing a profile silently dropped it.

Add a "cs" query parameter to BaseFmt (exported inside the TLS-only
block alongside alpn, since cipherSuites is TLS-only) and a "cs" field
to VmessQRCode, mapped in VmessFmt.

The key matches the one used by the v2rayNG fork (patterniha/PattNG#3)
so links carrying cipher suites interop between the two clients.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@patterniha
patterniha merged commit 02c9808 into master Jul 10, 2026
@patterniha patterniha changed the title feat: round-trip CipherSuites in share links and VMess QR code feat: complete CipherSuites support - share links, VMess QR code, sing-box TLS Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant