Compare commits

..

3 Commits

Author SHA1 Message Date
ezequielnick
e3cc4d4970 chore: update deps 2025-08-03 11:54:24 +08:00
ezequielnick
266953e525 chore: remove default policy-priority 2025-08-03 10:18:21 +08:00
ezequielnick
36c4b6f0d1 fix: smart gruop "MATCH" 2025-08-03 09:56:37 +08:00
3 changed files with 4064 additions and 5035 deletions

View File

@ -23,75 +23,75 @@
"build:linux": "electron-vite build && electron-builder --publish never --linux"
},
"dependencies": {
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^3.0.0",
"@heroui/react": "^2.6.14",
"@mihomo-party/sysproxy": "^2.0.7",
"@mihomo-party/sysproxy-darwin-arm64": "^2.0.7",
"@electron-toolkit/preload": "^3.0.2",
"@electron-toolkit/utils": "^4.0.0",
"@heroui/react": "^2.8.2",
"@mihomo-party/sysproxy": "^2.0.8",
"@mihomo-party/sysproxy-darwin-arm64": "^2.0.8",
"@types/crypto-js": "^4.2.2",
"adm-zip": "^0.5.16",
"axios": "^1.7.7",
"chokidar": "^4.0.1",
"axios": "^1.11.0",
"chokidar": "^4.0.3",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
"express": "^5.0.1",
"i18next": "^24.2.2",
"express": "^5.1.0",
"i18next": "^25.3.2",
"iconv-lite": "^0.6.3",
"react-i18next": "^15.4.0",
"webdav": "^5.7.1",
"ws": "^8.18.0",
"yaml": "^2.6.0"
"react-i18next": "^15.6.1",
"webdav": "^5.8.0",
"ws": "^8.18.3",
"yaml": "^2.8.0"
},
"devDependencies": {
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@electron-toolkit/eslint-config-prettier": "^2.0.0",
"@electron-toolkit/eslint-config-ts": "^2.0.0",
"@electron-toolkit/eslint-config-prettier": "^3.0.0",
"@electron-toolkit/eslint-config-ts": "^3.1.0",
"@electron-toolkit/tsconfig": "^1.0.1",
"@types/adm-zip": "^0.5.6",
"@types/express": "^5.0.0",
"@types/node": "^22.13.1",
"@types/adm-zip": "^0.5.7",
"@types/express": "^5.0.3",
"@types/node": "^24.1.0",
"@types/pubsub-js": "^1.8.6",
"@types/react": "^19.0.4",
"@types/react-dom": "^19.0.2",
"@types/ws": "^8.5.13",
"@vitejs/plugin-react": "^4.3.3",
"autoprefixer": "^10.4.20",
"cron-validator": "^1.3.1",
"driver.js": "^1.3.5",
"electron": "^34.0.2",
"electron-builder": "25.1.8",
"electron-vite": "^2.3.0",
"@types/react": "^19.1.9",
"@types/react-dom": "^19.1.7",
"@types/ws": "^8.18.1",
"@vitejs/plugin-react": "^4.7.0",
"autoprefixer": "^10.4.21",
"cron-validator": "^1.4.0",
"driver.js": "^1.3.6",
"electron": "^37.2.5",
"electron-builder": "26.0.12",
"electron-vite": "^4.0.0",
"electron-window-state": "^5.0.3",
"eslint": "8.57.1",
"eslint-plugin-react": "^7.37.2",
"form-data": "^4.0.1",
"framer-motion": "12.0.11",
"eslint": "9.32.0",
"eslint-plugin-react": "^7.37.5",
"form-data": "^4.0.4",
"framer-motion": "12.23.12",
"lodash": "^4.17.21",
"meta-json-schema": "^1.18.9",
"monaco-yaml": "^5.2.3",
"nanoid": "^5.0.8",
"next-themes": "^0.4.3",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"meta-json-schema": "^1.19.12",
"monaco-yaml": "^5.4.0",
"nanoid": "^5.1.5",
"next-themes": "^0.4.6",
"postcss": "^8.5.6",
"prettier": "^3.6.2",
"pubsub-js": "^1.9.5",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-error-boundary": "^5.0.0",
"react-icons": "^5.3.0",
"react-markdown": "^9.0.1",
"react-monaco-editor": "^0.58.0",
"react-router-dom": "^7.1.5",
"react-virtuoso": "^4.12.0",
"recharts": "^2.13.3",
"swr": "^2.2.5",
"tailwindcss": "^3.4.17",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"react-error-boundary": "^6.0.0",
"react-icons": "^5.5.0",
"react-markdown": "^10.1.0",
"react-monaco-editor": "^0.59.0",
"react-router-dom": "^7.7.1",
"react-virtuoso": "^4.13.0",
"recharts": "^3.1.0",
"swr": "^2.3.4",
"tailwindcss": "^4.1.11",
"tar": "^7.4.3",
"tsx": "^4.19.2",
"tsx": "^4.20.3",
"types-pac": "^1.0.3",
"typescript": "^5.6.3",
"vite": "^6.0.7",
"typescript": "^5.9.2",
"vite": "^7.0.6",
"vite-plugin-monaco-editor": "^1.1.0"
},
"packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c"

8965
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -40,7 +40,7 @@ function main(config) {
// 确保 Smart 组有正确的配置
if (!group['policy-priority']) {
group['policy-priority'] = 'Premium:0.9;SG:1.3'
group['policy-priority'] = '' // policy-priority: <1 means lower priority, >1 means higher priority, the default is 1, pattern support regex and string
}
// 始终使用用户配置的值
group.uselightgbm = ${useLightGBM}
@ -63,7 +63,7 @@ function main(config) {
const smartGroup = {
name: 'Smart Group',
type: 'smart',
'policy-priority': 'Premium:0.9;SG:1.3',
'policy-priority': '', // policy-priority: <1 means lower priority, >1 means higher priority, the default is 1, pattern support regex and string
uselightgbm: ${useLightGBM},
collectdata: ${collectData},
strategy: '${strategy}',
@ -118,18 +118,24 @@ function main(config) {
// 处理字符串格式的规则
const parts = rule.split(',').map(part => part.trim())
if (parts.length >= 3) {
// 找到代理组名称的位置通常是第3个参数但需要排除规则参数
if (parts.length >= 2) {
// 找到代理组名称的位置
let targetIndex = -1
let targetValue = ''
// 从第3个参数开始查找索引2找到第一个不是规则参数的值
for (let i = 2; i < parts.length; i++) {
const part = parts[i]
if (!ruleParams.has(part)) {
targetIndex = i
targetValue = part
break
// 对于 MATCH 规则目标在第2个位置索引1
if (parts[0] === 'MATCH' && parts.length === 2) {
targetIndex = 1
targetValue = parts[1]
} else if (parts.length >= 3) {
// 对于其他规则从第3个参数开始查找索引2找到第一个不是规则参数的值
for (let i = 2; i < parts.length; i++) {
const part = parts[i]
if (!ruleParams.has(part)) {
targetIndex = i
targetValue = part
break
}
}
}