From e1489a3cf759225528b336b960b716302b1974b2 Mon Sep 17 00:00:00 2001 From: xream Date: Mon, 2 Sep 2024 21:19:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20sing-box=20VLESS=20Reality=20uTLS=20?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=90=AF=E7=94=A8?= 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 | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/backend/package.json b/backend/package.json index bf38065fe..36de3afed 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.370", + "version": "2.14.372", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/producers/sing-box.js b/backend/src/core/proxy-utils/producers/sing-box.js index dafb483bf..29fd787f0 100644 --- a/backend/src/core/proxy-utils/producers/sing-box.js +++ b/backend/src/core/proxy-utils/producers/sing-box.js @@ -204,11 +204,6 @@ const tlsParser = (proxy, parsedProxy) => { if (proxy.ca) parsedProxy.tls.certificate_path = `${proxy.ca}`; if (proxy.ca_str) parsedProxy.tls.certificate = [proxy.ca_str]; if (proxy['ca-str']) parsedProxy.tls.certificate = [proxy['ca-str']]; - if (proxy['client-fingerprint'] && proxy['client-fingerprint'] !== '') - parsedProxy.tls.utls = { - enabled: true, - fingerprint: proxy['client-fingerprint'], - }; if (proxy['reality-opts']) { parsedProxy.tls.reality = { enabled: true }; if (proxy['reality-opts']['public-key']) @@ -217,7 +212,13 @@ const tlsParser = (proxy, parsedProxy) => { if (proxy['reality-opts']['short-id']) parsedProxy.tls.reality.short_id = proxy['reality-opts']['short-id']; + parsedProxy.tls.utls = { enabled: true }; } + if (proxy['client-fingerprint'] && proxy['client-fingerprint'] !== '') + parsedProxy.tls.utls = { + enabled: true, + fingerprint: proxy['client-fingerprint'], + }; if (!parsedProxy.tls.enabled) delete parsedProxy.tls; };