feat: 输出到 Clash/Stash/Shadowrocket 时, 会过滤掉配置了前置代理的节点, 并提示使用对应的功能

This commit is contained in:
xream
2025-04-26 13:46:58 +08:00
parent 4c4bda563a
commit da9b1d8795
4 changed files with 14 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.19.32",
"version": "2.19.33",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"scripts": {

View File

@@ -1,4 +1,5 @@
import { isPresent } from '@/core/proxy-utils/producers/utils';
import $ from '@/core/app';
export default function Clash_Producer() {
const type = 'ALL';
@@ -46,6 +47,11 @@ export default function Clash_Producer() {
proxy['reality-opts']))
) {
return false;
} else if (proxy['underlying-proxy'] || proxy['dialer-proxy']) {
$.error(
`Clash 不支持前置代理字段. 已过滤节点 ${proxy.name}`,
);
return false;
}
return true;
})
@@ -152,11 +158,6 @@ export default function Clash_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;
}

View File

@@ -1,4 +1,5 @@
import { isPresent } from '@/core/proxy-utils/producers/utils';
import $ from '@/core/app';
export default function Shadowrocket_Producer() {
const type = 'ALL';
@@ -10,6 +11,11 @@ export default function Shadowrocket_Producer() {
return false;
} else if (['mieru', 'anytls'].includes(proxy.type)) {
return false;
} else if (proxy['underlying-proxy'] || proxy['dialer-proxy']) {
$.error(
`Shadowrocket 不支持前置代理字段. 已过滤节点 ${proxy.name}. 请使用 App 内的 "代理通过" 功能`,
);
return false;
}
return true;
})