Skip to content

Commit 0d6b0ea

Browse files
committed
区域过滤和协议过滤支持保留模式和过滤模式(后端需 >= 2.17.0, 前端需 >= 2.15.0)
1 parent 20cce6d commit 0d6b0ea

File tree

5 files changed

+211
-25
lines changed

5 files changed

+211
-25
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store-front-end",
3-
"version": "2.14.344",
3+
"version": "2.15.0",
44
"private": true,
55
"scripts": {
66
"dev": "vite --host",

src/changelogs/2025-03-02.md

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
date: 2025-03-02
3+
---
4+
5+
### 阶段性更新汇总
6+
7+
此处的更新可能不完整不及时
8+
9+
Telegram 频道 https://t.me/cool_scripts 内有每次更新的详细说明
10+
11+
功能新增
12+
13+
• 区域过滤和协议过滤支持保留模式和过滤模式(后端需 >= 2.17.0, 前端需 >= 2.15.0)
14+
15+
• 订阅管理
16+
17+
• 支持环境变量 SUB_STORE_PRODUCE_CRON 在后台定时处理订阅。
18+
19+
• 订阅支持开关 passThroughUA 透传请求的 User-Agent。
20+
21+
• 组合订阅支持手动设置流量信息,可使用链接,响应内容即为流量信息。
22+
23+
• 远程订阅支持透传请求的 User-Agent。
24+
25+
• 协议支持
26+
27+
• sing-box 及 Egern 支持 anytls 协议。
28+
29+
• Egern 和 Stash 可根据 User-Agent 自动包含官方/商店版/未续费订阅不支持的协议。
30+
31+
• Egern 正式支持 Shadowsocks 2022。
32+
33+
• Loon 正式支持 Shadowsocks 2022 和 Shadow-TLS。
34+
35+
• Surge 默认开启 Shadowsocks 2022。
36+
37+
• sing-box 及 Egern 支持 Hysteria2 端口跳跃。
38+
39+
• VLESS 支持 spx 参数;Trojan 支持 REALITY/XHTTP 结合使用。
40+
41+
• Proxy URI Scheme 支持省略端口号(HTTP 默认 80,TLS 默认 443)。
42+
43+
• Shadowrocket 的 Shadowsocks 输入支持 Shadow TLS 参数。
44+
45+
• Egern 支持 prev_hop 前置代理。
46+
47+
• Mihomo 配置
48+
49+
• Mihomo 配置支持 覆写 多次使用。
50+
51+
• Mihomo 配置的 Snell 版本 < 3 时,强制去除 udp 字段以防止内核报错。
52+
53+
• Mihomo 配置文件支持 流量信息链接 设置。
54+
55+
优化改进
56+
57+
• 解析 & 兼容性
58+
59+
• 修复 Shadowsocks URI 解析逻辑,支持 Shadow TLS plugin。
60+
61+
• UUID 仅辅助判断,不直接过滤;VMess/VLESS 校验 UUID。
62+
63+
• 兼容 v2rayN 非标 TUIC URI,并支持更多 TUIC URI 字段。
64+
65+
• Egern 增加默认 SNI。
66+
67+
• Loon 排除 XTLS。
68+
69+
• 界面优化
70+
71+
• 预览界面:
72+
73+
• 复制分享链接优化,新增一键复制按钮。
74+
75+
• 订阅管理界面顶部标签栏始终显示,增加 PWA 判断。
76+
77+
• 修复宽屏设备下节点信息面板二维码样式问题。
78+
79+
• 文件管理
80+
81+
• target 名称适配大小写和别名。
82+
83+
• Mihomo 配置中订阅名称选取交互优化。
84+
85+
• 订阅流量信息去除空字段,增强兼容性。
86+
87+
修复
88+
89+
• 修复 Surge 输入的 tfo。
90+
91+
• 修复 Loon ip-mode 逻辑。
92+
93+
• 修复 Egern VMess tcp 传输层问题。
94+
95+
• 修复 TUIC URI 解析问题。
96+
97+
• 修复 组合订阅 透传 User-Agent 逻辑。
98+
99+
• 修复 Base64 解码合法性判断。
100+
101+
• 修复 Clash Pre-processor 逻辑。
102+
103+
• 修复 短 ID 正则匹配 问题。
104+
105+
• 修复 代理 App 版 target 参数为空的情况。
106+
107+
其他
108+
109+
• geo 数据更新。
110+
111+
• README 文档调整。
112+
113+
• pnpm 依赖更新,构建方式调整(使用 esbuild)。
114+
115+
• GitHub Actions 流水线优化。
116+
117+
这一版本包含了大量新增特性和修复,建议所有用户尽快更新! 🚀

src/locales/en.ts

+4
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,8 @@ export default {
432432
},
433433
"Region Filter": {
434434
label: "Region Filter",
435+
des: ["Region", "Mode"],
436+
modeOptions: ["Retain", "Remove"],
435437
options: [
436438
"🇭🇰 HK",
437439
"🇨🇳 TW",
@@ -447,6 +449,8 @@ export default {
447449
},
448450
"Type Filter": {
449451
label: "Node Type Filter",
452+
des: ["Type", "Mode"],
453+
modeOptions: ["Retain", "Remove"],
450454
options: [
451455
"Shadowsocks",
452456
"ShadowsocksR",

src/locales/zh.ts

+4
Original file line numberDiff line numberDiff line change
@@ -445,12 +445,16 @@ export default {
445445
},
446446
'Region Filter': {
447447
label: '区域过滤',
448+
des: ['区域', '工作模式'],
449+
modeOptions: ['保留模式', '过滤模式'],
448450
options: ['🇭🇰 HK', '🇨🇳 TW', '🇸🇬 SG', '🇯🇵 JP', '🇬🇧 UK', '🇺🇸 US', '🇩🇪 DE', '🇰🇷 KR'],
449451
tipsTitle: '区域过滤操作提示',
450452
tipsDes: '按照国家和区域过滤节点',
451453
},
452454
'Type Filter': {
453455
label: '协议过滤',
456+
des: ['协议', '工作模式'],
457+
modeOptions: ['保留模式', '过滤模式'],
454458
options: [
455459
'Shadowsocks',
456460
'ShadowsocksR',

src/views/editor/components/FilterSelect.vue

+85-24
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
<template>
22
<div class="editor-action-card">
3+
<p class="des-label">
4+
{{ $t(`editorPage.subConfig.nodeActions['${type}'].des[1]`) }}
5+
</p>
6+
<nut-radiogroup direction="horizontal" v-model="mode">
7+
<nut-radio v-for="(key, index) in opt[type].mode" :label="key" :key="index"
8+
>{{
9+
$t(`editorPage.subConfig.nodeActions['${type}'].modeOptions[${index}]`)
10+
}}
11+
</nut-radio>
12+
</nut-radiogroup>
13+
<p class="des-label">
14+
{{ $t(`editorPage.subConfig.nodeActions['${type}'].des[0]`) }}
15+
</p>
316
<nut-checkboxgroup class="checkbox-group" v-model="value">
417
<nut-checkbox
518
:icon-size="16"
6-
v-for="(item, index) in opt[type]"
19+
v-for="(item, index) in opt[type].value"
720
:key="item"
821
:label="item"
922
>
@@ -17,8 +30,17 @@
1730
</template>
1831

1932
<script lang="ts" setup>
20-
import { inject, ref, onMounted } from 'vue';
33+
import { inject, ref, watch, onMounted } from 'vue';
2134
import tw from '@/assets/icons/tw.png';
35+
import semverGt from 'semver/functions/gt';
36+
import { useAppNotifyStore } from '@/store/appNotify';
37+
import { storeToRefs } from 'pinia';
38+
import { useGlobalStore } from '@/store/global';
39+
40+
const globalStore = useGlobalStore();
41+
const { env } = storeToRefs(globalStore);
42+
43+
const { showNotify } = useAppNotifyStore();
2244
2345
const { type, id } = defineProps<{
2446
type: string;
@@ -30,39 +52,78 @@
3052
// 此处 key 需要与 i18n 的 actions 中的 key 相同
3153
// 值的次序需要与该选项的 options 值 顺序相同
3254
const opt = {
33-
'Region Filter': ['HK', 'TW', 'SG', 'JP', 'UK', 'US', 'DE', 'KR'],
34-
'Type Filter': [
35-
'ss',
36-
'ssr',
37-
'vmess',
38-
'vless',
39-
'trojan',
40-
'http',
41-
'socks5',
42-
'snell',
43-
'tuic',
44-
'hysteria',
45-
'hysteria2',
46-
'juicity',
47-
'mieru',
48-
'anytls',
49-
'wireguard',
50-
'ssh',
51-
'external',
52-
'direct'
53-
],
55+
'Region Filter': {
56+
mode: [0, 1],
57+
value: ['HK', 'TW', 'SG', 'JP', 'UK', 'US', 'DE', 'KR']
58+
},
59+
'Type Filter': {
60+
mode: [0, 1],
61+
value: [
62+
'ss',
63+
'ssr',
64+
'vmess',
65+
'vless',
66+
'trojan',
67+
'http',
68+
'socks5',
69+
'snell',
70+
'tuic',
71+
'hysteria',
72+
'hysteria2',
73+
'juicity',
74+
'mieru',
75+
'anytls',
76+
'wireguard',
77+
'ssh',
78+
'external',
79+
'direct'
80+
]
81+
},
5482
};
5583
5684
const value = ref([]);
85+
const mode = ref();
86+
87+
// try {
88+
// if(!semverGt(env.value.version, '2.16.63')) {
89+
// showNotify({
90+
// title: `请更新后端, 版本应大于 2.16.63`,
91+
// type: 'danger',
92+
// });
93+
// }
94+
// } catch (e) {}
5795
5896
// 挂载时将 value 值指针指向 form 对应的数据
5997
onMounted(() => {
6098
const item = form.process.find(item => item.id === id);
61-
if (item) value.value = item.args;
99+
if (item) {
100+
let v = item.args?.value || item.args;
101+
if (!Array.isArray(v)){
102+
v = [];
103+
}
104+
const keep = item.args?.keep ?? true;
105+
item.args = { keep, value: v };
106+
value.value = item.args.value;
107+
mode.value = item.args.keep ? 0 : 1;
108+
}
109+
});
110+
111+
watch(mode, () => {
112+
const item = form.process.find(item => item.id === id);
113+
item.args.keep = !mode.value;
62114
});
63115
</script>
64116

65117
<style lang="scss" scoped>
118+
.des-label {
119+
font-size: 12px;
120+
margin-bottom: 8px;
121+
color: var(--comment-text-color);
122+
123+
&:not(:first-child) {
124+
margin-top: 16px;
125+
}
126+
}
66127
.checkbox-group {
67128
display: grid;
68129
grid-template-columns: 1fr 1fr;

0 commit comments

Comments
 (0)