From 810ca5dee955370af769be17761f4e5939b238d5 Mon Sep 17 00:00:00 2001 From: xream Date: Wed, 5 Aug 2026 11:52:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20sing-box=20Hysteria=202=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20`disable=5Fchrome=5Fparrot`=20=E5=92=8C=20`bbr=5Fpr?= =?UTF-8?q?ofile`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/producers/sing-box.js | 3 +++ scripts/demo.js | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 657f4096..f82cb34b 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.36.30", + "version": "2.36.31", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "packageManager": "pnpm@11.0.9", diff --git a/backend/src/core/proxy-utils/producers/sing-box.js b/backend/src/core/proxy-utils/producers/sing-box.js index 2f710179..f371e6d3 100644 --- a/backend/src/core/proxy-utils/producers/sing-box.js +++ b/backend/src/core/proxy-utils/producers/sing-box.js @@ -1075,6 +1075,9 @@ const hysteria2Parser = (proxy = {}) => { if (proxy['obfs-password']) parsedProxy.obfs.password = proxy['obfs-password']; if (!parsedProxy.obfs.type) delete parsedProxy.obfs; + if (proxy['bbr-profile']) parsedProxy.bbr_profile = proxy['bbr-profile']; + if (proxy['disable-chrome-parrot']) + parsedProxy.disable_chrome_parrot = !!proxy['disable-chrome-parrot']; networkParser(proxy, parsedProxy); tlsParser(proxy, parsedProxy); tfoParser(proxy, parsedProxy); diff --git a/scripts/demo.js b/scripts/demo.js index 272cf260..bc0c05a2 100644 --- a/scripts/demo.js +++ b/scripts/demo.js @@ -58,6 +58,7 @@ function operator(proxies = [], targetPlatform, context) { // 33. sing-box Snell 出站默认允许 version 4/5/6, 其中 version 5 会按 sing-box 行为输出成 version 4. 开启“含不支持的协议”时保留 version 1/2/3/4/5/6, 并支持 version 6 通过节点字段 `quic-proxy-mode` 设置 `quic_proxy_mode`. 节点上的 `_userkey` 会输出为 sing-box 的 `userkey` // 34. VLESS/Trojan URI 的 `vcn` 对应 mihomo 的 `name-cert-verify`. Xray-core 支持用逗号分隔多个 name, mihomo 只支持一个, 因此输入时取第一个有效值, 同时用 `_vcn` 数组保留全部有效值; 输出 URI 时优先用 `_vcn` 还原为 `vcn`, 没有 `_vcn` 时才使用 `name-cert-verify`. 若想设置为其他值, 可使用脚本操作设置, 例如 `$server["name-cert-verify"] = $server._vcn?.[1] || $server._vcn?.[0]` // 35. sing-box AnyTLS 支持通过节点的字符串字段 `client-metadata` 设置 `client_metadata` + // 36. sing-box Hysteria 2 支持通过节点的字符串字段 `disable-chrome-parrot` 设置 `disable_chrome_parrot` // require 为 Node.js 的 require, 在 Node.js 运行环境下 可以用来引入模块 // 例如在 Node.js 环境下, 将文件内容写入 /tmp/1.txt 文件