Skip to content

Commit

Permalink
区域过滤和协议过滤支持保留模式和过滤模式(后端需 >= 2.17.0, 前端需 >= 2.15.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Mar 2, 2025
1 parent 20cce6d commit 0d6b0ea
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store-front-end",
"version": "2.14.344",
"version": "2.15.0",
"private": true,
"scripts": {
"dev": "vite --host",
Expand Down
117 changes: 117 additions & 0 deletions src/changelogs/2025-03-02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
date: 2025-03-02
---

### 阶段性更新汇总

此处的更新可能不完整不及时

Telegram 频道 https://t.me/cool_scripts 内有每次更新的详细说明

功能新增

• 区域过滤和协议过滤支持保留模式和过滤模式(后端需 >= 2.17.0, 前端需 >= 2.15.0)

• 订阅管理

• 支持环境变量 SUB_STORE_PRODUCE_CRON 在后台定时处理订阅。

• 订阅支持开关 passThroughUA 透传请求的 User-Agent。

• 组合订阅支持手动设置流量信息,可使用链接,响应内容即为流量信息。

• 远程订阅支持透传请求的 User-Agent。

• 协议支持

• sing-box 及 Egern 支持 anytls 协议。

• Egern 和 Stash 可根据 User-Agent 自动包含官方/商店版/未续费订阅不支持的协议。

• Egern 正式支持 Shadowsocks 2022。

• Loon 正式支持 Shadowsocks 2022 和 Shadow-TLS。

• Surge 默认开启 Shadowsocks 2022。

• sing-box 及 Egern 支持 Hysteria2 端口跳跃。

• VLESS 支持 spx 参数;Trojan 支持 REALITY/XHTTP 结合使用。

• Proxy URI Scheme 支持省略端口号(HTTP 默认 80,TLS 默认 443)。

• Shadowrocket 的 Shadowsocks 输入支持 Shadow TLS 参数。

• Egern 支持 prev_hop 前置代理。

• Mihomo 配置

• Mihomo 配置支持 覆写 多次使用。

• Mihomo 配置的 Snell 版本 < 3 时,强制去除 udp 字段以防止内核报错。

• Mihomo 配置文件支持 流量信息链接 设置。

优化改进

• 解析 & 兼容性

• 修复 Shadowsocks URI 解析逻辑,支持 Shadow TLS plugin。

• UUID 仅辅助判断,不直接过滤;VMess/VLESS 校验 UUID。

• 兼容 v2rayN 非标 TUIC URI,并支持更多 TUIC URI 字段。

• Egern 增加默认 SNI。

• Loon 排除 XTLS。

• 界面优化

• 预览界面:

• 复制分享链接优化,新增一键复制按钮。

• 订阅管理界面顶部标签栏始终显示,增加 PWA 判断。

• 修复宽屏设备下节点信息面板二维码样式问题。

• 文件管理

• target 名称适配大小写和别名。

• Mihomo 配置中订阅名称选取交互优化。

• 订阅流量信息去除空字段,增强兼容性。

修复

• 修复 Surge 输入的 tfo。

• 修复 Loon ip-mode 逻辑。

• 修复 Egern VMess tcp 传输层问题。

• 修复 TUIC URI 解析问题。

• 修复 组合订阅 透传 User-Agent 逻辑。

• 修复 Base64 解码合法性判断。

• 修复 Clash Pre-processor 逻辑。

• 修复 短 ID 正则匹配 问题。

• 修复 代理 App 版 target 参数为空的情况。

其他

• geo 数据更新。

• README 文档调整。

• pnpm 依赖更新,构建方式调整(使用 esbuild)。

• GitHub Actions 流水线优化。

这一版本包含了大量新增特性和修复,建议所有用户尽快更新! 🚀
4 changes: 4 additions & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ export default {
},
"Region Filter": {
label: "Region Filter",
des: ["Region", "Mode"],
modeOptions: ["Retain", "Remove"],
options: [
"🇭🇰 HK",
"🇨🇳 TW",
Expand All @@ -447,6 +449,8 @@ export default {
},
"Type Filter": {
label: "Node Type Filter",
des: ["Type", "Mode"],
modeOptions: ["Retain", "Remove"],
options: [
"Shadowsocks",
"ShadowsocksR",
Expand Down
4 changes: 4 additions & 0 deletions src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,12 +445,16 @@ export default {
},
'Region Filter': {
label: '区域过滤',
des: ['区域', '工作模式'],
modeOptions: ['保留模式', '过滤模式'],
options: ['🇭🇰 HK', '🇨🇳 TW', '🇸🇬 SG', '🇯🇵 JP', '🇬🇧 UK', '🇺🇸 US', '🇩🇪 DE', '🇰🇷 KR'],
tipsTitle: '区域过滤操作提示',
tipsDes: '按照国家和区域过滤节点',
},
'Type Filter': {
label: '协议过滤',
des: ['协议', '工作模式'],
modeOptions: ['保留模式', '过滤模式'],
options: [
'Shadowsocks',
'ShadowsocksR',
Expand Down
109 changes: 85 additions & 24 deletions src/views/editor/components/FilterSelect.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
<template>
<div class="editor-action-card">
<p class="des-label">
{{ $t(`editorPage.subConfig.nodeActions['${type}'].des[1]`) }}
</p>
<nut-radiogroup direction="horizontal" v-model="mode">
<nut-radio v-for="(key, index) in opt[type].mode" :label="key" :key="index"
>{{
$t(`editorPage.subConfig.nodeActions['${type}'].modeOptions[${index}]`)
}}
</nut-radio>
</nut-radiogroup>
<p class="des-label">
{{ $t(`editorPage.subConfig.nodeActions['${type}'].des[0]`) }}
</p>
<nut-checkboxgroup class="checkbox-group" v-model="value">
<nut-checkbox
:icon-size="16"
v-for="(item, index) in opt[type]"
v-for="(item, index) in opt[type].value"
:key="item"
:label="item"
>
Expand All @@ -17,8 +30,17 @@
</template>

<script lang="ts" setup>
import { inject, ref, onMounted } from 'vue';
import { inject, ref, watch, onMounted } from 'vue';
import tw from '@/assets/icons/tw.png';
import semverGt from 'semver/functions/gt';
import { useAppNotifyStore } from '@/store/appNotify';
import { storeToRefs } from 'pinia';
import { useGlobalStore } from '@/store/global';
const globalStore = useGlobalStore();
const { env } = storeToRefs(globalStore);
const { showNotify } = useAppNotifyStore();
const { type, id } = defineProps<{
type: string;
Expand All @@ -30,39 +52,78 @@
// 此处 key 需要与 i18n 的 actions 中的 key 相同
// 值的次序需要与该选项的 options 值 顺序相同
const opt = {
'Region Filter': ['HK', 'TW', 'SG', 'JP', 'UK', 'US', 'DE', 'KR'],
'Type Filter': [
'ss',
'ssr',
'vmess',
'vless',
'trojan',
'http',
'socks5',
'snell',
'tuic',
'hysteria',
'hysteria2',
'juicity',
'mieru',
'anytls',
'wireguard',
'ssh',
'external',
'direct'
],
'Region Filter': {
mode: [0, 1],
value: ['HK', 'TW', 'SG', 'JP', 'UK', 'US', 'DE', 'KR']
},
'Type Filter': {
mode: [0, 1],
value: [
'ss',
'ssr',
'vmess',
'vless',
'trojan',
'http',
'socks5',
'snell',
'tuic',
'hysteria',
'hysteria2',
'juicity',
'mieru',
'anytls',
'wireguard',
'ssh',
'external',
'direct'
]
},
};
const value = ref([]);
const mode = ref();
// try {
// if(!semverGt(env.value.version, '2.16.63')) {
// showNotify({
// title: `请更新后端, 版本应大于 2.16.63`,
// type: 'danger',
// });
// }
// } catch (e) {}
// 挂载时将 value 值指针指向 form 对应的数据
onMounted(() => {
const item = form.process.find(item => item.id === id);
if (item) value.value = item.args;
if (item) {
let v = item.args?.value || item.args;
if (!Array.isArray(v)){
v = [];
}
const keep = item.args?.keep ?? true;
item.args = { keep, value: v };
value.value = item.args.value;
mode.value = item.args.keep ? 0 : 1;
}
});
watch(mode, () => {
const item = form.process.find(item => item.id === id);
item.args.keep = !mode.value;
});
</script>

<style lang="scss" scoped>
.des-label {
font-size: 12px;
margin-bottom: 8px;
color: var(--comment-text-color);
&:not(:first-child) {
margin-top: 16px;
}
}
.checkbox-group {
display: grid;
grid-template-columns: 1fr 1fr;
Expand Down

0 comments on commit 0d6b0ea

Please sign in to comment.