Skip to content

Commit b156297

Browse files
committed
fix: 修复 shadowrocket 输出筛选逻辑
1 parent da7cccb commit b156297

2 files changed

Lines changed: 16 additions & 12 deletions

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.64",
3+
"version": "2.20.65",
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/shadowrocket.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,21 @@ export default function Shadowrocket_Producer() {
1111
return false;
1212
} else if (['mieru', 'sudoku', 'naive'].includes(proxy.type)) {
1313
return false;
14-
} else if (proxy.encryption && proxy.encryption !== 'none' && ['vless'].includes(proxy.type)) {
14+
} else if (
15+
proxy.encryption &&
16+
proxy.encryption !== 'none' &&
17+
['vless'].includes(proxy.type)
18+
) {
19+
return false;
20+
} else if (
21+
['anytls'].includes(proxy.type) &&
22+
proxy.network &&
23+
(!['tcp'].includes(proxy.network) ||
24+
(['tcp'].includes(proxy.network) &&
25+
proxy['reality-opts']))
26+
) {
27+
return false;
28+
} else if (['xhttp'].includes(proxy.network)) {
1529
return false;
1630
}
1731
return true;
@@ -130,16 +144,6 @@ export default function Shadowrocket_Producer() {
130144
delete proxy['shadow-tls-sni'];
131145
delete proxy['shadow-tls-version'];
132146
}
133-
} else if (
134-
['anytls'].includes(proxy.type) &&
135-
proxy.network &&
136-
(!['tcp'].includes(proxy.network) ||
137-
(['tcp'].includes(proxy.network) &&
138-
proxy['reality-opts']))
139-
) {
140-
return false;
141-
} else if (['xhttp'].includes(proxy.network)) {
142-
return false;
143147
}
144148

145149
if (

0 commit comments

Comments
 (0)