From 4c4bda563ab94a28c9e064557bc233f5c1577bc3 Mon Sep 17 00:00:00 2001 From: xream Date: Tue, 22 Apr 2025 09:42:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Stash=20=E8=BE=93=E5=87=BA=E4=B8=AD?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=8E=89=E6=9C=89=E5=89=8D=E7=BD=AE=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E7=9A=84=E8=8A=82=E7=82=B9,=20=E5=B9=B6=E5=9C=A8?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=B8=AD=E6=8F=90=E7=A4=BA?= 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/stash.js | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/backend/package.json b/backend/package.json index 47ee17f..859b5ab 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.19.31", + "version": "2.19.32", "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/stash.js b/backend/src/core/proxy-utils/producers/stash.js index eaf1662..7658370 100644 --- a/backend/src/core/proxy-utils/producers/stash.js +++ b/backend/src/core/proxy-utils/producers/stash.js @@ -1,4 +1,5 @@ import { isPresent } from '@/core/proxy-utils/producers/utils'; +import $ from '@/core/app'; export default function Stash_Producer() { const type = 'ALL'; @@ -50,6 +51,11 @@ export default function Stash_Producer() { : proxy.type === 'vless' && proxy['reality-opts']) ) { return false; + } else if (proxy['underlying-proxy'] || proxy['dialer-proxy']) { + $.error( + `Stash 暂不支持前置代理字段. 已过滤节点 ${proxy.name}. 请使用 代理的转发链 https://stash.wiki/proxy-protocols/proxy-groups#relay`, + ); + return false; } return true; }) @@ -257,11 +263,6 @@ export default function Stash_Producer() { } delete proxy['tls-fingerprint']; - if (proxy['underlying-proxy']) { - proxy['dialer-proxy'] = proxy['underlying-proxy']; - } - delete proxy['underlying-proxy']; - if (isPresent(proxy, 'tls') && typeof proxy.tls !== 'boolean') { delete proxy.tls; }