[GH-ISSUE #6840] [Bug]: cipher Suites Doesn't show up in client application / Subscription #4549

Open
opened 2026-10-31 20:40:26 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @hesamhanari on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6840

Describe the bug

وقتی داخل پنل، تنظیمات
Cipher Suite
رو تغییر میدم، داخل سابسکریپشن و یا کلاینت‌های مختلف هیچ تغییری ایجاد نمیشه و سایفرسوییت به صورت خالی نمایش داده میشه.

How to reproduce the problem

یک اینباند جدید بسازید.
حتما tls داشته باشد
داخل تنظیمات سایفر، یکی از گزینه هارا انتخاب کنید.
اینباند را به یوزر اد کنید.
سابکریپشن را اپدیت کنید
اینباند اضافه شده داخل برنامه یوزر، بدون سایفرسوییت خواهد بود.

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.10.2

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24.04

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @hesamhanari on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6840 ### Describe the bug وقتی داخل پنل، تنظیمات Cipher Suite رو تغییر میدم، داخل سابسکریپشن و یا کلاینت‌های مختلف هیچ تغییری ایجاد نمیشه و سایفرسوییت به صورت خالی نمایش داده میشه. ### How to reproduce the problem یک اینباند جدید بسازید. حتما tls داشته باشد داخل تنظیمات سایفر، یکی از گزینه هارا انتخاب کنید. اینباند را به یوزر اد کنید. سابکریپشن را اپدیت کنید اینباند اضافه شده داخل برنامه یوزر، بدون سایفرسوییت خواهد بود. ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.10.2 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 24.04 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
Author
Owner

@MHSanaei commented on GitHub (Oct 16, 2026):

@claude analyze

<!-- gh-comment-id:6212794001 --> @MHSanaei commented on GitHub (Oct 16, 2026): @claude analyze
Author
Owner

@github-actions[bot] commented on GitHub (Oct 16, 2026):

به احتمال زیاد این باگ نیست و رفتار فعلی پنل همین است. لینک‌های اشتراک‌گذاری (vless://، vmess://، trojan://) و سابسکریپشن معمولی هیچ پارامتری برای Cipher Suites ندارند، پس کلاینت نمی‌تواند این فیلد را از لینک پر کند و خالی نشانش می‌دهد. فقط سابسکریپشن JSON مقدار cipherSuites را به کلاینت می‌فرستد. در گزارش نوشته نشده کلاینت کدام نوع سابسکریپشن را وارد کرده؛ همین تعیین می‌کند باگ است یا نه.

هر خروجی با Cipher Suites چه می‌کند (نسخه 3.10.2 و main فعلی):

  • لینک / سابسکریپشن معمولی: تابع applyShareTLSParams در internal/sub/service.go:1831-1865 فقط security، alpn، sni، fp، ech، vcn و pcs را می‌نویسد. نسخه‌ی VMess یعنی applyVmessTLSParams (internal/sub/service.go:1867-1900) هم همین فیلدها را دارد. پارامتری برای cipher suite نوشته نمی‌شود. سازنده‌ی لینک در فرانت‌اند (frontend/src/lib/xray/) و پیاده‌سازی docs/lib/xray/ هم چنین پارامتری ندارند. قالب استاندارد لینک Xray اصلاً فیلدی برای این کار ندارد.
  • سابسکریپشن JSON: مقدار اینباند در internal/sub/json_service.go:787-788 منتقل می‌شود:
    if cs, ok := tData["cipherSuites"].(string); ok && cs != "" {
    	tlsData["cipherSuites"] = cs
    
    اگر از Host استفاده کنید، override آن هم از internal/sub/host_sub.go:74-75 و internal/sub/service.go:2157-2158 اعمال می‌شود. تست‌های TestSubJsonServiceTLSCipherSuitesForwarded (internal/sub/json_service_test.go:206) و TestSub_HostCipherSuitesJSON (internal/sub/host_sub_test.go:596) این رفتار را تضمین می‌کنند.
  • سابسکریپشن Clash/mihomo: تابع tlsData در internal/sub/clash_service.go:1226-1238 فقط serverName، alpn، fingerprint و pin-sha256 را می‌نویسد و cipher suite ندارد.

راه حل: اگر کلاینت باید Cipher Suites را داشته باشد، به جای لینک یا سابسکریپشن معمولی، آدرس سابسکریپشن JSON پنل را وارد کنید. اگر کلاینت از کانفیگ JSON پشتیبانی نمی‌کند، مقدار را دستی در کلاینت وارد کنید.

برای اینکه موضوع روشن شود، لطفاً این‌ها را بنویسید:

  1. کلاینت کدام را وارد کرده بود: لینک/QR، آدرس سابسکریپشن معمولی، سابسکریپشن JSON، یا سابسکریپشن Clash؟ پاسخ این سؤال مشخص می‌کند که رفتار عادی است یا باگ.
  2. اگر سابسکریپشن JSON بود: بلوک tlsSettings از فایل JSON دانلودشده (با دامنه و UUID پوشانده‌شده)، و اسم کلاینت. اگر در آن JSON کلید cipherSuites وجود نداشته باشد، باگ واقعی است.

این تحلیل دوباره و کامل روی سورس فعلی انجام شد. نتیجه‌اش با #6741 یکی است: آنجا هم همین پرسش مطرح بود و گزارش‌دهنده تأیید کرد که از لینک VLESS استفاده کرده است.

Verdict: Not a bug (expected behaviour), assuming the client imported a share link or the plain/Clash subscription
Severity: N/A
Confidence: Medium (the reporter did not say which subscription format the client imported)
Root cause: None for share links. No cipher-suite parameter exists in the share-link format, and applyShareTLSParams (internal/sub/service.go:1831) / applyVmessTLSParams (internal/sub/service.go:1867) do not write one. The JSON subscription forwards it (internal/sub/json_service.go:787-788, added in d9b599b9 "fix(sub): forward tlsSettings.cipherSuites into the JSON subscription"). The Clash tlsData (internal/sub/clash_service.go:1226) omits it.
Same class: None found
Already fixed: Not applicable
Duplicate of: Related: #6741 (same question; that reporter confirmed they had used a VLESS link)
Evidence: internal/sub/service.go:1831-1865, 1867-1900, 2157-2158; internal/sub/json_service.go:787-788; internal/sub/host_sub.go:74-75; internal/sub/clash_service.go:1226-1238; tests TestSubJsonServiceTLSCipherSuitesForwarded (internal/sub/json_service_test.go:206) and TestSub_HostCipherSuitesJSON (internal/sub/host_sub_test.go:596)
Not determined: Which subscription format and client app the reporter uses. A JSON subscription served without cipherSuites for a TLS inbound with suites set would be a real bug; the reporter's downloaded JSON would settle it.

این پاسخ به‌صورت خودکار و با خواندن سورس مخزن تهیه شده است؛ ممکن است یکی از نگهدارندگان پروژه هم پاسخ دهد.

<!-- gh-comment-id:6212829418 --> @github-actions[bot] commented on GitHub (Oct 16, 2026): به احتمال زیاد این باگ نیست و رفتار فعلی پنل همین است. لینک‌های اشتراک‌گذاری (`vless://`، `vmess://`، `trojan://`) و سابسکریپشن معمولی هیچ پارامتری برای Cipher Suites ندارند، پس کلاینت نمی‌تواند این فیلد را از لینک پر کند و خالی نشانش می‌دهد. فقط **سابسکریپشن JSON** مقدار `cipherSuites` را به کلاینت می‌فرستد. در گزارش نوشته نشده کلاینت کدام نوع سابسکریپشن را وارد کرده؛ همین تعیین می‌کند باگ است یا نه. **هر خروجی با Cipher Suites چه می‌کند (نسخه 3.10.2 و `main` فعلی):** - **لینک / سابسکریپشن معمولی:** تابع `applyShareTLSParams` در `internal/sub/service.go:1831-1865` فقط `security`، `alpn`، `sni`، `fp`، `ech`، `vcn` و `pcs` را می‌نویسد. نسخه‌ی VMess یعنی `applyVmessTLSParams` (`internal/sub/service.go:1867-1900`) هم همین فیلدها را دارد. پارامتری برای cipher suite نوشته نمی‌شود. سازنده‌ی لینک در فرانت‌اند (`frontend/src/lib/xray/`) و پیاده‌سازی `docs/lib/xray/` هم چنین پارامتری ندارند. قالب استاندارد لینک Xray اصلاً فیلدی برای این کار ندارد. - **سابسکریپشن JSON:** مقدار اینباند در `internal/sub/json_service.go:787-788` منتقل می‌شود: ```go if cs, ok := tData["cipherSuites"].(string); ok && cs != "" { tlsData["cipherSuites"] = cs ``` اگر از Host استفاده کنید، override آن هم از `internal/sub/host_sub.go:74-75` و `internal/sub/service.go:2157-2158` اعمال می‌شود. تست‌های `TestSubJsonServiceTLSCipherSuitesForwarded` (`internal/sub/json_service_test.go:206`) و `TestSub_HostCipherSuitesJSON` (`internal/sub/host_sub_test.go:596`) این رفتار را تضمین می‌کنند. - **سابسکریپشن Clash/mihomo:** تابع `tlsData` در `internal/sub/clash_service.go:1226-1238` فقط `serverName`، `alpn`، `fingerprint` و `pin-sha256` را می‌نویسد و cipher suite ندارد. **راه حل:** اگر کلاینت باید Cipher Suites را داشته باشد، به جای لینک یا سابسکریپشن معمولی، آدرس سابسکریپشن JSON پنل را وارد کنید. اگر کلاینت از کانفیگ JSON پشتیبانی نمی‌کند، مقدار را دستی در کلاینت وارد کنید. **برای اینکه موضوع روشن شود، لطفاً این‌ها را بنویسید:** 1. کلاینت کدام را وارد کرده بود: لینک/QR، آدرس سابسکریپشن معمولی، سابسکریپشن JSON، یا سابسکریپشن Clash؟ پاسخ این سؤال مشخص می‌کند که رفتار عادی است یا باگ. 2. اگر سابسکریپشن JSON بود: بلوک `tlsSettings` از فایل JSON دانلودشده (با دامنه و UUID پوشانده‌شده)، و اسم کلاینت. اگر در آن JSON کلید `cipherSuites` وجود نداشته باشد، باگ واقعی است. این تحلیل دوباره و کامل روی سورس فعلی انجام شد. نتیجه‌اش با #6741 یکی است: آنجا هم همین پرسش مطرح بود و گزارش‌دهنده تأیید کرد که از لینک VLESS استفاده کرده است. Verdict: Not a bug (expected behaviour), assuming the client imported a share link or the plain/Clash subscription Severity: N/A Confidence: Medium (the reporter did not say which subscription format the client imported) Root cause: None for share links. No cipher-suite parameter exists in the share-link format, and `applyShareTLSParams` (`internal/sub/service.go:1831`) / `applyVmessTLSParams` (`internal/sub/service.go:1867`) do not write one. The JSON subscription forwards it (`internal/sub/json_service.go:787-788`, added in d9b599b9 "fix(sub): forward tlsSettings.cipherSuites into the JSON subscription"). The Clash `tlsData` (`internal/sub/clash_service.go:1226`) omits it. Same class: None found Already fixed: Not applicable Duplicate of: Related: #6741 (same question; that reporter confirmed they had used a VLESS link) Evidence: `internal/sub/service.go:1831-1865`, `1867-1900`, `2157-2158`; `internal/sub/json_service.go:787-788`; `internal/sub/host_sub.go:74-75`; `internal/sub/clash_service.go:1226-1238`; tests `TestSubJsonServiceTLSCipherSuitesForwarded` (`internal/sub/json_service_test.go:206`) and `TestSub_HostCipherSuitesJSON` (`internal/sub/host_sub_test.go:596`) Not determined: Which subscription format and client app the reporter uses. A JSON subscription served without `cipherSuites` for a TLS inbound with suites set would be a real bug; the reporter's downloaded JSON would settle it. *این پاسخ به‌صورت خودکار و با خواندن سورس مخزن تهیه شده است؛ ممکن است یکی از نگهدارندگان پروژه هم پاسخ دهد.* <!-- claude-issue:analyst -->
Author
Owner

@HamidrezaTg commented on GitHub (Oct 22, 2026):

Confirmed on v3.10.2: Hosts cipher suites only reach JSON/Clash subscriptions (applyExternalProxyTLSToStream); the raw share-link builder (applyExternalProxyTLSParams in internal/sub/service.go) never writes cs. Clients that read cs (e.g. PattNG, with fp=unsafe) therefore get an empty value. PR #6825 adds cs to vless/trojan/vmess share links and would fix this.

<!-- gh-comment-id:6351601702 --> @HamidrezaTg commented on GitHub (Oct 22, 2026): Confirmed on v3.10.2: Hosts cipher suites only reach JSON/Clash subscriptions (`applyExternalProxyTLSToStream`); the raw share-link builder (`applyExternalProxyTLSParams` in `internal/sub/service.go`) never writes `cs`. Clients that read `cs` (e.g. PattNG, with `fp=unsafe`) therefore get an empty value. PR #6825 adds `cs` to vless/trojan/vmess share links and would fix this.
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#4549
No description provided.