mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/mihomo-party-org/clash-party.git
synced 2026-09-20 08:03:39 +08:00
Client-side hardening of the CPX airport plugin, squashed from 46 commits
forked at 89c2bb0e. Behaviour changes:
- Unified operation model (§0.4/0.5): one deadline + one AbortSignal + one
persistence commit per operation; per-plugin lock → vault lock hierarchy;
tombstone on delete; every wait (lock, DNS preflight, proxy resolution,
vault decrypt) is bounded by the same budget.
- Routing: direct/proxy auto-fallback with a pre-send guard; proxied https
builds its own CONNECT tunnel (an aborted hung CONNECT closes its socket);
invalid local-proxy ports are refused instead of falling back to :80; the
core's inbound credentials are carried to the local proxy; NAT64 and
site-local IPv6 ranges are non-public.
- Gateways: multi-gateway recovery with one rediscovery per operation,
normalized endpoint paths, signed discovery documents (Ed25519, seq/digest
accept/align/rollback/equivocation), commit order vault → plugin.yaml.
- Subscriptions: a fetched subscription is validated by the core (mihomo -t)
against the current override set before it replaces the profile, inside
the profile write critical section (profile.yaml and override.yaml share
one write queue); schedule fields are read at write time; the first
subscription is activated through the real switch flow; profile deletion
removes the record last so any failure stays retryable.
- Devices: a re-login that replaces a still-valid device records it in the
vault (staleDevices) and retires it after the login, after later
successful fetches and on removal; enroll compensation restores the old
vault and keeps an un-revoked new device for retirement.
- Vault: on Linux the vault is persisted only behind a system secret store
(backend name + ciphertext-prefix canary); otherwise it stays in memory.
A cache-miss read releases the caller at the budget while the lock is held
until the decrypt ends.
- Config caches (plugin.yaml, profile.yaml, override.yaml) can no longer be
rolled back by a late cold read.
- Reference gateway and provider guides updated (deploy contract, discoveryUrls
same-origin rule, /revoke after re-login); https-proxy-agent dropped.
Reviewed in a Codex loop (gpt-6, 38 calls): 74 findings, 68 fixed and
verified, 6 invalid, no backlog. Tests: vitest 501, gateway 106.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
133 lines
4.9 KiB
JSON
133 lines
4.9 KiB
JSON
{
|
|
"name": "mihomo-party",
|
|
"version": "2.0.2",
|
|
"description": "Clash Party",
|
|
"type": "module",
|
|
"main": "./out/main/index.js",
|
|
"author": "mihomo-party-org",
|
|
"homepage": "https://clashparty.org",
|
|
"scripts": {
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --list-different .",
|
|
"hooks:install": "node scripts/install-git-hooks.mjs",
|
|
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
|
"lint:check": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts",
|
|
"review": "pnpm run format:check && pnpm run lint:check && pnpm run typecheck",
|
|
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
|
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
|
|
"typecheck": "pnpm run typecheck:node && pnpm run typecheck:web",
|
|
"prepare": "pnpm run hooks:install && node scripts/prepare.mjs",
|
|
"prepare:dev": "pnpm run hooks:install && node scripts/update-version.mjs && node scripts/prepare.mjs",
|
|
"updater": "node scripts/updater.mjs",
|
|
"checksum": "node scripts/checksum.mjs",
|
|
"copy-legacy": "node scripts/copy-legacy-artifacts.mjs",
|
|
"test-copy-legacy": "node scripts/test-copy-legacy.mjs",
|
|
"telegram": "node scripts/telegram.mjs release",
|
|
"telegram:dev": "node scripts/telegram.mjs dev",
|
|
"artifact": "node scripts/artifact.mjs",
|
|
"ensure:electron": "node node_modules/electron/install.js",
|
|
"dev": "pnpm run ensure:electron && electron-vite dev",
|
|
"postinstall": "pnpm run ensure:electron && electron-builder install-app-deps",
|
|
"build:win": "electron-vite build && electron-builder --publish never --win",
|
|
"build:win:dev": "pnpm run prepare:dev && electron-vite build && electron-builder --publish never --win",
|
|
"build:mac": "electron-vite build && electron-builder --publish never --mac",
|
|
"build:mac:dev": "pnpm run prepare:dev && electron-vite build && electron-builder --publish never --mac",
|
|
"build:linux": "electron-vite build && electron-builder --publish never --linux",
|
|
"build:linux:dev": "pnpm run prepare:dev && electron-vite build && electron-builder --publish never --linux"
|
|
},
|
|
"dependencies": {
|
|
"@electron-toolkit/utils": "^4.0.0",
|
|
"@types/d3": "^7.4.3",
|
|
"@types/plist": "^3.0.5",
|
|
"adm-zip": "^0.6.0",
|
|
"age-encryption": "^0.3.0",
|
|
"axios": "^1.19.0",
|
|
"chokidar": "^5.0.0",
|
|
"croner": "^10.0.1",
|
|
"crypto-js": "^4.2.0",
|
|
"d3": "^7.9.0",
|
|
"express": "^5.2.1",
|
|
"file-icon": "^6.0.0",
|
|
"file-icon-info": "^1.1.1",
|
|
"flag-icons": "^7.5.0",
|
|
"http-proxy-agent": "^9.1.0",
|
|
"i18next": "^26.3.6",
|
|
"iconv-lite": "^0.7.3",
|
|
"js-yaml": "^5.2.3",
|
|
"plist": "^5.0.0",
|
|
"qrcode.react": "^4.2.0",
|
|
"sysproxy-rs": "file:src\\native\\sysproxy",
|
|
"validator": "^13.15.35",
|
|
"webdav": "^5.10.0",
|
|
"ws": "^8.21.3",
|
|
"yaml": "^2.9.0"
|
|
},
|
|
"devDependencies": {
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@electron-toolkit/eslint-config-prettier": "^3.0.0",
|
|
"@electron-toolkit/eslint-config-ts": "^3.1.0",
|
|
"@electron-toolkit/tsconfig": "^2.0.0",
|
|
"@heroui/react": "^2.8.10",
|
|
"@tailwindcss/vite": "^4.3.3",
|
|
"@types/adm-zip": "^0.5.8",
|
|
"@types/crypto-js": "^4.2.2",
|
|
"@types/express": "^5.0.6",
|
|
"@types/node": "^26.2.0",
|
|
"@types/pubsub-js": "^1.8.6",
|
|
"@types/react": "^19.2.18",
|
|
"@types/react-dom": "^19.2.4",
|
|
"@types/validator": "^13.15.10",
|
|
"@types/ws": "^8.18.1",
|
|
"@typescript-eslint/eslint-plugin": "8.66.0",
|
|
"@typescript-eslint/parser": "8.66.0",
|
|
"@vitejs/plugin-react": "^5.2.0",
|
|
"chart.js": "^4.5.1",
|
|
"cron-validator": "^1.4.0",
|
|
"dayjs": "^1.11.21",
|
|
"driver.js": "^1.6.0",
|
|
"electron": "^43.5.1",
|
|
"electron-builder": "26.15.7",
|
|
"electron-vite": "4.0.1",
|
|
"electron-window-state": "^5.0.3",
|
|
"eslint": "9.39.2",
|
|
"eslint-plugin-import": "^2.32.0",
|
|
"eslint-plugin-react": "^7.37.5",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"form-data": "^4.0.6",
|
|
"lodash": "^4.18.1",
|
|
"meta-json-schema": "^1.19.29",
|
|
"monaco-yaml": "^5.5.1",
|
|
"motion": "12.23.26",
|
|
"nanoid": "^6.0.1",
|
|
"next-themes": "^0.4.6",
|
|
"postcss": "^8.5.26",
|
|
"prettier": "^3.9.6",
|
|
"pubsub-js": "^1.9.5",
|
|
"react": "^19.2.8",
|
|
"react-chartjs-2": "^5.3.1",
|
|
"react-dom": "^19.2.8",
|
|
"react-error-boundary": "^6.1.2",
|
|
"react-i18next": "^17.0.11",
|
|
"react-icons": "^5.7.0",
|
|
"react-markdown": "^10.1.0",
|
|
"react-monaco-editor": "^0.59.0",
|
|
"react-router-dom": "^7.18.2",
|
|
"react-virtuoso": "^4.18.11",
|
|
"swr": "^2.5.0",
|
|
"tailwindcss": "^4.3.3",
|
|
"tar": "^7.5.22",
|
|
"tsx": "^4.23.12",
|
|
"types-pac": "^1.0.3",
|
|
"typescript": "^5.9.3",
|
|
"typescript-eslint": "8.66.0",
|
|
"vite": "^7.3.5",
|
|
"vite-plugin-monaco-editor": "^1.1.0",
|
|
"vitest": "4.1.10"
|
|
},
|
|
"packageManager": "pnpm@11.8.0"
|
|
}
|