Commit Graph

165 Commits

Author SHA1 Message Date
ezequielnick
a092eb50c3 feat(plugin): CPX v2 availability hardening (squash of cpx-v2-availability-hardening)
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>
2026-09-08 22:44:13 +08:00
luantu
f9c841a6f6 feat: auto-switch profile by WiFi SSID
* feat: auto-switch profile by WiFi SSID

Add ssidProfileMap (SSID -> profile ID) and ssidProfileRestore to app config.
When connecting to a mapped WiFi SSID, automatically switch to the
corresponding subscription profile. Optionally restore the previous
profile when leaving the mapped SSID. pauseSSID takes priority.

* fix: send profileConfigUpdated after SSID-triggered profile switch

changeCurrentProfile() does not notify the renderer via IPC.
The renderer relies on the profileConfigUpdated event to revalidate
its SWR cache, so SSID-based switching was effective in the backend
but the UI didn't reflect it until a manual refresh.

* perf: event-driven SSID detection on macOS via scutil -w

Replace 30s polling with scutil -w child process on macOS.
scutil -w blocks on a SystemConfiguration key, consuming zero CPU
until the network state changes, then exits. On exit we debounce
500ms and re-check the SSID.

Windows/Linux keep polling, reduced from 30s to 15s.
Also add anti-tight-loop guard (1s minimum restart interval).
2026-08-20 10:17:47 +08:00
zjdndjf
2210eedbdc feat: add independent core log toggle
Closes #414
2026-08-05 20:25:40 +08:00
zjdndjf
a9e0c6d26f feat: add startup subscription update toggle
Closes #542
2026-08-05 20:25:40 +08:00
Tongyuxiu Zhou
e019290493 feat: redesign airport plugin UI & support per-plugin proxy settings (#2007)
* feat: redesign and streamline the airport plugin interface

* feat: support per-plugin proxy settings
2026-07-23 02:18:21 +08:00
zjdndjf
a84c18a7c3 feat: add silent app updates 2026-07-22 03:17:42 +08:00
Memory
0f32c1b373 refactor: update controller panel style and interactions 2026-07-10 20:21:20 +08:00
ezequielnick
726d12c74c feat: associate CPX plugin files 2026-07-10 10:55:57 +08:00
zjdndjf
a7c8e7b1fd feat: support post-up core startup detection
Co-authored-by: xishang0128 <xishang02@gmail.com>
2026-07-05 01:58:51 +08:00
ezequielnick
0c891030df feat: airport plugin 2026-07-01 08:46:41 +08:00
zjdndjf
c9bf199b06 feat: add toggle to lock sider cards in place
Closes #1957
2026-07-01 05:50:33 +08:00
zjdndjf
f030a7c003 chore: rename tray icon state key and drop dead branch 2026-07-01 05:38:33 +08:00
Eugene
7a3e3cd46f feat: support tray icons by state (#1962)
Co-authored-by: Eugene <laueugene23@gmail.com>
2026-07-01 05:26:01 +08:00
Tongyuxiu Zhou
01902f9c31 feat: add toggle to remember selected sider card 2026-06-27 19:39:51 +08:00
Memory
a4e4c6186a feat: add lightweight mode behavior toggle 2026-06-19 23:52:54 +08:00
zjdndjf
6337ac8928 feat: support age encrypted gist sync 2026-06-14 05:12:40 +08:00
zjdndjf
807495749a feat: support age encrypted profiles 2026-06-14 02:55:32 +08:00
zjdndjf
2604aafe8b feat: make network info cards sortable 2026-06-13 23:29:32 +08:00
zjdndjf
36dbf3dcc6 feat: remember selected sider card 2026-06-13 21:13:46 +08:00
zjdndjf
32e86b8466 feat: add option to disable app log output, close #1895 2026-06-07 03:28:40 +08:00
Memory
549e6cc0a8 fix: stop traffic logger immediately when disabled 2026-06-06 20:32:56 +08:00
zjdndjf
98476eff3e feat: persist IP provider selection, close #1881 2026-06-01 00:21:00 +08:00
zjdndjf
ef788eff57 feat: add custom network latency targets 2026-04-26 22:17:19 +08:00
Memory
f494ff7d00 Revert "功能: 新增应用代理管理页面,支持按应用开关代理"
This reverts commit 09ed12c67f.
2026-04-26 12:44:09 +08:00
Jing Nan Meng
09ed12c67f 功能: 新增应用代理管理页面,支持按应用开关代理
* feat: add app proxy management page with per-app proxy toggle

- Add Apps page showing active connections grouped by process
- Add per-app proxy on/off switch (disabled apps get DIRECT rule)
- Add AppsCard to sidebar navigation
- Add IAppProxyRule type and appProxyRules config
- Inject PROCESS-NAME rules for disabled apps in factory
- Fix removeAllListeners to removeListener for mihomoConnections
- Add i18n for apps page (zh-CN, zh-TW, en-US, ru-RU, fa-IR)

* chore: 将 .omc, .claude, debug 目录从版本控制中移除

- 将 .omc, .claude, debug 加入 .gitignore
- 将 .omc, .claude, debug 加入 .prettierignore
- 从 git 追踪中移除 .omc 目录
2026-04-26 12:32:31 +08:00
zjdndjf
2ecded88b3 feat: add custom tray icon support 2026-04-20 18:43:11 +08:00
zjdndjf
de60c12ff2 feat: add connection close option for hot reload profile switch 2026-04-20 18:22:31 +08:00
Memory
e006871c9a feat: add traffic analytics page with per-device/host/proxy breakdown 2026-04-17 21:09:00 +08:00
zjdndjf
00e551d728 feat: replace restartCore with hot reload for config switches and overrides 2026-04-17 13:24:36 +08:00
zjdndjf
2a04cafee5 feat: add per-log-file size limit with truncation 2026-04-14 17:29:41 +08:00
Krystic Chung
0371e11130 feat: add option to use system DNS when SSID triggers direct modeFeature/ssid disable dns (#1751)
* feat: add option to use system DNS when SSID triggers direct mode

- Add 'disableDnsOnPauseSSID' setting to use system default DNS when switching to direct mode
- Clear dns-hijack in TUN config when controlDns is disabled to prevent DNS resolution failure
- Update UI with new setting toggle under SSID direct connection settings
- Add i18n translations for zh-CN, zh-TW, en-US, ru-RU, fa-IR

* fix: persist DNS state and restore on any mode switch

- Save controlDnsBeforePause to appConfig for persistence across restarts
- Move DNS restore logic to patchControledMihomoConfig for unified handling
- Use event-driven restartCore to avoid circular dependency
- Restore DNS state when manually switching from direct to rule/global mode
2026-04-13 13:28:47 +08:00
zjdndjf
a5c59ce689 fix: resolve type safety regressions across renderer and config 2026-04-06 01:16:03 +08:00
Memory
06591b50f4 feat: add GitHub proxy selection with auto multi-source fallback 2026-04-04 19:27:06 +08:00
YangChengxxyy
93d552870e feat: 新增全局快捷键 复制命令行命令
Co-authored-by: YangChengxxyy <yangc27@trip.com>
2026-04-01 19:11:45 +08:00
StarHeart
2a4b9f4e5b feat: support user agent config per sub (#1712)
* feat: add user agent support in profile configuration

* Introduced a new user agent field in profile settings, allowing users to specify a custom user agent.
* Updated relevant components and localization files to support the new user agent feature.
* Added a new pnpm workspace configuration for built dependencies.

* feat: enhance profile settings with user agent input and toggle functionality

* Added a user agent input field to the advanced profile settings.
* Implemented toggle icons for showing/hiding advanced settings.
* Updated layout to accommodate the new user agent input alongside the existing auth token field.

* chore: remove pnpm workspace configuration for built dependencies
2026-03-29 18:54:56 +08:00
Memory
07dd85db84 add types & refactor: simplify rule-item extra handling
* add types

* refactor: simplify rule-item extra handling
2026-03-28 11:19:31 +08:00
Memory
85f9e4755a feat: add network info page & card with IP display, auto-merge missing sider order entries 2026-03-22 11:35:14 +08:00
Memory
dae4939390 feat: add Fish and Nushell support for environment variables 2026-02-03 21:16:42 +08:00
Memory
d2f700a0ef feat: add rule statistics and disable toggle 2026-02-03 20:25:57 +08:00
julong
d3a23a0601 feat: subscription timeout settings & subscription update logic efficiency (#1562)
1. Add updateTimeout property to IProfileItem interface
2. Add dedicated timeout config option for subscriptions
3. Improve subscription update logic efficiency
4. Use subscriptionTimeout as the smart fallback time
5. Localize
profiles.editInfo.updateTimeout and profiles.editInfo.updateTimeoutPlaceholder for en-US/fa-IR/ru-RU/zh-CN/zh-TW
2026-01-23 20:42:45 +08:00
Memory
72dd214ef0 feat: add startup configuration file check 2026-01-17 22:15:48 +08:00
Memory
52cefa39d3 feat: add option to hide unavailable proxies in proxy list 2026-01-10 14:55:10 +08:00
Memory
b7d6ea8e7a feat: add tray proxy group style option with submenu mode 2025-12-20 00:33:51 +08:00
xmk23333
393a32bcfe feat: add WebDAV certificate ignore option and improve event listener cleanup 2025-12-14 21:46:43 +08:00
Memory
7a79adef2e Add Traditional Chinese (Taiwan) translation
* Add Traditional Chinese (Taiwan) translation

* Add common.loading translation
2025-12-09 23:48:28 +08:00
Memory
f541b5ead1 feat: add authentication token support 2025-12-01 07:56:07 +08:00
Memory
583ece0a64 feat: support disabling autoupdate 2025-11-25 22:21:14 +08:00
Memory
4b8ae4063d feat: add swap tray click option in settings 2025-11-24 19:26:17 +08:00
Memory
fb33f37652 feat: Data Colletct File Size
* add @mihomo-party/sysproxy

* feat: Data Colletct File Size

* update changelog
2025-11-17 22:54:17 +08:00
Memory
e1b8c9960a feat: show current proxy in tray 2025-11-14 21:58:24 +08:00