mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-19 03:25:01 +03:00
feat(sub): add Incy app-management parameters (#6650)
* feat(sub): add Incy app-management parameters The panel already pushes a set of Happ headers, but INCY documents its own lowercase header names and its own value domains, so a Happ-shaped payload gets ignored by the client (per-app mode is bypass|proxy, not on|bypass, and per-app-proxy-enable has no Happ counterpart at all). Add a sibling Incy path that emits exactly the documented headers. Covered, per https://docs.incy.cc/en/app-management/: - profile-description, sort-order, support-email, announce-url, premium-url - banner text/button/URL and the two hex colours - hide-url, hide-check, no-limit-enabled - per-app split tunnelling (enable/mode/list) - TCP fragmentation (enable/length/interval/packets) - UDP noise packets (enable/type/packet/delay) - DoH pre-resolution (enable/domain/IP) Each string setting is tri-state: an empty value omits the header, so an untouched panel never overrides the subscriber's own choice in the app. Values are validated against the documented domains and dropped when they do not match, and non-ASCII text is base64-wrapped the way the docs require for Cyrillic. INCY identifies itself as INCY/<version>/<platform>, which gates the headers behind the same auto-detect switch the Happ path uses. Headers the panel already emits for every client (Profile-Title, Support-Url, Profile-Web-Page-Url, Announce, Profile-Update-Interval, Subscription-Userinfo) and Incy's routing line are left as they are. The Premium API (theme, defaultPingProtocol, fallbackHosts, ...) is a separate encrypted endpoint and stays out of scope here. * fix(sub): keep Incy per-app list entries separate on the wire The Incy settings textarea takes one package per line, as Incy documents for per-app-proxy-list, but the header path ran the value through sanitizeHeaderValue, which deletes CR/LF. "com.google.chrome\norg.telegram.messenger" reached the client as the single bogus package "com.google.chromeorg.telegram.messenger", so per-app split tunnelling silently matched no app. Join comma- or line-separated entries as CSV instead. Also drop three tests that could not fail: TestIncyExcludesHappOnlyHeaders (ApplyIncyHeaders has no path that emits Happ headers, and the non-Happ UA gate is already pinned by TestApplyHappHeaders_Gating) and two UI tests that only asserted updateSetting received the key the JSX passes it. --------- Co-authored-by: DIMFLIX <dimflix@users.noreply.github.com> Co-authored-by: MHSanaei <ho3ein.sanaei@gmail.com>
This commit is contained in:
@@ -1670,7 +1670,76 @@
|
||||
"discordNotifyTimeDesc": "Discord 機器人傳送週期性報告的頻率。選擇預設間隔,或選擇「自訂」以輸入 crontab 運算式。",
|
||||
"discordNotifyBackup": "資料庫備份",
|
||||
"discordNotifyBackupDesc": "傳送帶有報告的資料庫備份檔案",
|
||||
"discordEventBusNotifyDesc": "選擇觸發 Discord 通知的事件"
|
||||
"discordEventBusNotifyDesc": "選擇觸發 Discord 通知的事件",
|
||||
"subIncyAppAutoDetect": "Incy 標頭自動辨識",
|
||||
"subIncyAppAutoDetectDesc": "用戶端 User-Agent 為 INCY 時送出 Incy 標頭。",
|
||||
"subIncyNotSet": "未設定",
|
||||
"subIncyOn": "開",
|
||||
"subIncyOff": "關",
|
||||
"subIncyGroupApp": "應用程式",
|
||||
"subIncyProfileDescription": "訂閱描述",
|
||||
"subIncyProfileDescriptionDesc": "獨立的訂閱描述。非 ASCII 文字以 base64 傳送。",
|
||||
"subIncySortOrder": "伺服器排序",
|
||||
"subIncySortOrderDesc": "iOS/Android 只影響本訂閱,桌面版為全域設定。",
|
||||
"subIncySortNone": "依訂閱順序",
|
||||
"subIncySortPing": "依延遲",
|
||||
"subIncySortName": "依名稱",
|
||||
"subIncySupportEmail": "客服信箱",
|
||||
"subIncySupportEmailDesc": "在訂閱卡片顯示「Email」按鈕。",
|
||||
"subIncyAnnounceUrl": "公告連結",
|
||||
"subIncyAnnounceUrlDesc": "首頁公告的導向連結。",
|
||||
"subIncyPremiumUrl": "Premium 連結",
|
||||
"subIncyPremiumUrlDesc": "訂閱卡片中的 Premium 按鈕,橫幅按鈕也優先使用。",
|
||||
"subIncyGroupBanners": "橫幅",
|
||||
"subIncyBannerText": "橫幅文字",
|
||||
"subIncyBannerTextDesc": "覆寫橫幅文字。僅限 Premium 供應商。",
|
||||
"subIncyBannerButtonText": "橫幅按鈕文字",
|
||||
"subIncyBannerButtonTextDesc": "橫幅按鈕標題。留空則不顯示按鈕。",
|
||||
"subIncyBannerButtonUrl": "橫幅按鈕連結",
|
||||
"subIncyBannerButtonUrlDesc": "橫幅按鈕的 URL。",
|
||||
"subIncyBannerBgColor": "橫幅背景色",
|
||||
"subIncyBannerBgColorDesc": "十六進位色碼,例如 #E53E3E。",
|
||||
"subIncyBannerButtonColor": "橫幅按鈕顏色",
|
||||
"subIncyBannerButtonColorDesc": "十六進位色碼,例如 #38A169。",
|
||||
"subIncyGroupPrivacy": "隱私",
|
||||
"subIncyHideUrl": "隱藏訂閱網址",
|
||||
"subIncyHideUrlDesc": "在分享、複製、QR 與備份中隱藏網址。",
|
||||
"subIncyHideCheck": "隱藏檢查按鈕",
|
||||
"subIncyHideCheckDesc": "從首頁移除連線檢查按鈕。",
|
||||
"subIncyNoLimit": "No-Limit 模式 (iOS)",
|
||||
"subIncyNoLimitDesc": "省記憶體模式,讓通道在 iOS 50 MB 限制內存活。",
|
||||
"subIncyPerAppEnable": "分應用程式模式 (Android)",
|
||||
"subIncyPerAppEnableDesc": "啟用分應用程式分流。關閉會覆寫使用者自己的選擇。",
|
||||
"subIncyPerAppMode": "分應用程式模式類型",
|
||||
"subIncyPerAppModeDesc": "proxy 表示只有列出的應用走 VPN,bypass 則相反。",
|
||||
"subIncyPerAppModeProxy": "僅列出的應用",
|
||||
"subIncyPerAppModeBypass": "列出的應用繞過",
|
||||
"subIncyPerAppList": "應用程式清單",
|
||||
"subIncyPerAppListDesc": "套件名稱以逗號或換行分隔,也可填文字檔的 URL。",
|
||||
"subIncyGroupNetwork": "網路",
|
||||
"subIncyFragmentationEnable": "分段",
|
||||
"subIncyFragmentationEnableDesc": "啟用 TCP 分段,覆寫全域設定。",
|
||||
"subIncyFragmentLength": "分段長度",
|
||||
"subIncyFragmentLengthDesc": "位元組範圍,例如 10-30。",
|
||||
"subIncyFragmentInterval": "分段間隔",
|
||||
"subIncyFragmentIntervalDesc": "毫秒範圍,例如 20-40。",
|
||||
"subIncyFragmentPackets": "分段封包",
|
||||
"subIncyFragmentPacketsDesc": "要分段哪些 TCP 封包:tlshello、1-3、1 或 all。",
|
||||
"subIncyNoisesEnable": "雜訊封包",
|
||||
"subIncyNoisesEnableDesc": "握手前送出隨機 UDP 雜訊。",
|
||||
"subIncyNoisesType": "雜訊類型",
|
||||
"subIncyNoisesTypeDesc": "rand、str 或 hex。",
|
||||
"subIncyNoisesPacket": "雜訊內容",
|
||||
"subIncyNoisesPacketDesc": "酬載內容;rand 時填長度範圍,例如 10-20。",
|
||||
"subIncyNoisesDelay": "雜訊延遲",
|
||||
"subIncyNoisesDelayDesc": "毫秒延遲範圍,例如 10-50。",
|
||||
"subIncyResolveEnable": "預先解析伺服器位址 (DoH)",
|
||||
"subIncyResolveEnableDesc": "連線前透過 DoH 預先解析伺服器位址。",
|
||||
"subIncyResolveDnsDomain": "DoH 端點",
|
||||
"subIncyResolveDnsDomainDesc": "DoH 伺服器 URL,通常以 /dns-query 結尾。",
|
||||
"subIncyResolveDnsIp": "DoH 伺服器 IP",
|
||||
"subIncyResolveDnsIpDesc": "用於引導的 DoH 伺服器 IP。",
|
||||
"subIncyGroupRouting": "路由"
|
||||
},
|
||||
"xray": {
|
||||
"save": "儲存",
|
||||
|
||||
Reference in New Issue
Block a user