Skip to content

Commit 5d3790d

Browse files
committed
feat: Stash 支持 AnyTLS. 由于 Stash 的请求不带 build 等信息, 无法根据请求判断版本号自动开启. 请使用 includeUnsupportedProxy 参数或开启 包含官方/商店版不支持的协议 开关
1 parent 6c553e4 commit 5d3790d

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.20.59",
3+
"version": "2.20.60",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"scripts": {

backend/src/core/proxy-utils/producers/stash.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default function Stash_Producer() {
2323
'hysteria2',
2424
'ssh',
2525
'juicity',
26+
'anytls',
2627
].includes(proxy.type) ||
2728
(proxy.type === 'ss' &&
2829
![
@@ -54,6 +55,21 @@ export default function Stash_Producer() {
5455
`Stash 暂不支持前置代理字段. 已过滤节点 ${proxy.name}. 请使用 代理的转发链 https://stash.wiki/proxy-protocols/proxy-groups#relay`,
5556
);
5657
return false;
58+
} else if (
59+
['anytls'].includes(proxy.type) &&
60+
!opts['include-unsupported-proxy']
61+
) {
62+
return false;
63+
} else if (
64+
['anytls'].includes(proxy.type) &&
65+
proxy.network &&
66+
(!['tcp'].includes(proxy.network) ||
67+
(['tcp'].includes(proxy.network) &&
68+
proxy['reality-opts']))
69+
) {
70+
return false;
71+
} else if (['xhttp'].includes(proxy.network)) {
72+
return false;
5773
}
5874
return true;
5975
})

0 commit comments

Comments
 (0)