Commit Graph

60 Commits

Author SHA1 Message Date
Arvin 0ed44117e6 Allow disabling GitHub download mirrors (#320) 2026-09-24 15:19:32 +08:00
Arvin e858ec2f5e Fix TUN status with auto-redirect disabled
Text Encoding / utf8 (push) Successful in 55s
2026-08-19 09:37:42 +08:00
Arvin bbe2753a02 Fix TUN doctor systemd capability detection
Text Encoding / utf8 (push) Successful in 54s
Use the running Mihomo process capability for systemd doctor warnings while keeping the shell requirement for script backends.\n\nFixes #307
2026-08-16 18:54:57 +08:00
Arvin 712b77a43a Fix TUN proxy-off shell restore state
tun on-proxy-off cleared the system proxy block but left the shell restore flag enabled, so new login shells re-injected proxy variables. Disable both persistence layers and retain cleanup errors.\n\nFixes #308
2026-08-16 17:07:13 +08:00
Arvin d95661f295 Fix TUN policy-routing status detection
Text Encoding / utf8 (push) Failing after 1m44s
Unify TUN status classification around policy-routing evidence and wait for the controller before post-restart verification. Add a regression check for Issue #303.
2026-08-11 17:41:14 +08:00
wnlen df806124b3 Fix Hysteria2 and AnyTLS subscription support 2026-07-30 17:34:20 +08:00
Arvin 3be0915a71 Make clash the primary CLI command 2026-07-30 17:25:15 +08:00
Arvin ef59c36521 feat: add routing mode and connectivity commands 2026-07-30 16:38:46 +08:00
Arvin e1c9ee49f0 fix: restore subscription update compatibility
Text Encoding / utf8 (push) Successful in 1m31s
2026-07-17 10:20:31 +08:00
Arvin 57b3ec0c92 Speed up controller failure path
Text Encoding / utf8 (push) Successful in 1m2s
2026-07-04 21:41:22 +08:00
Arvin f782fbc7e0 Detect stale systemd service templates in doctor 2026-07-02 17:30:55 +08:00
Arvin 9ac17a58c4 Fix systemd boot runtime supervision 2026-07-02 17:10:19 +08:00
Arvin d9fcb67f43 Fix reported install, select, and zsh completion bugs 2026-07-02 11:51:01 +08:00
Arvin 12b465c02e Fix clashoff stopping runtime 2026-06-25 10:31:49 +08:00
Arvin e8206046fa Improve GitHub download mirror visibility and pool (#273)
Text Encoding / utf8 (push) Successful in 1m1s
- Add kkgithub.com (hostpath) to the default mirror pool alongside the
  existing gh-proxy.org / ghfast.top / ghproxy.net entries; all four
  verified reachable and capable of proxying GitHub release downloads.

- Add doctor_download_mirrors() section to 'clashctl doctor': shows
  whether a custom mirror (CLASH_GH_PROXY / CLASH_GH_PROXY_POOL) is
  active or the built-in pool is in use, last successful/failed mirror
  URL from the state file, and a one-liner hint for setting a custom
  mirror prefix.

- README: add 'GitHub 下载加速' subsection under .env config to explain
  that all GitHub assets (kernel, GEO data, yq, subconverter, dashboard)
  automatically go through the mirror pool, document CLASH_GH_PROXY and
  CLASH_GH_PROXY_POOL env vars with examples, and point users to
  ghproxy.link for a live mirror list and 'clashctl doctor' for status.
2026-06-16 16:48:42 +08:00
Arvin 2511b1285b Fix tun on: recognize setcap capability and block sudo on user install (#267)
Problem 1 - can_manage_tun_safely() missed setcap grants:
- Add kernel_binary_has_cap_net_admin(): use getcap to detect file
  capability cap_net_admin on the kernel binary, so a user who ran
  'setcap cap_net_admin,cap_net_raw+ep mihomo' is allowed through.
- Extend can_manage_tun_safely() to call this check after the existing
  capsh (current-shell) check.
- In cmd_tun_on(), add a process-level fallback via the existing
  tun_process_has_cap_net_admin() for cases where getcap is unavailable
  but the running process already holds the capability.

Problem 2 - sudo clashctl corrupts runtime file ownership:
- Add guard_sudo_on_user_install(): detects root + SUDO_USER +
  stored install scope == user, refuses with a clear message and
  instructs the user to run as the install user directly.
- Call the guard at the entry of both cmd_tun_on() and cmd_tun_off()
  so neither write path can corrupt runtime/ file ownership.
2026-06-16 16:40:19 +08:00
Arvin a13da0e565 Detect Tun traffic across default and parsed CIDR ranges
Generalize Tun source-IP detection in doctor log evidence: parse the
TUN adapter CIDR from logs and match traffic against it, while keeping
built-in default Tun ranges (28.x, 198.18.x, 198.19.x). Add offline
check script covering the new detection cases.
2026-06-16 16:16:12 +08:00
jawwe a488fc6435 fix dashboard and tun proxy controls 2026-05-22 17:28:42 +08:00
Arvin 3bcc9fd1a0 Clarify local proxy takeover status
Text Encoding / utf8 (push) Successful in 1m4s
2026-05-15 15:43:39 +08:00
yangtaowillv ea04c4da23 feat: add ALLOW-LAN; command: clashctl lan status/on/off 2026-05-07 11:06:48 +08:00
wnlen 8be724ce33 optimize: fast enable proxy when runtime is already running 2026-04-29 17:06:59 +08:00
wnlen f1589ee322 optimize: add fast path for already-enabled clashon 2026-04-29 16:49:09 +08:00
wnlen 9ee524f873 fix: report unsupported Tun state for systemd-user backend 2026-04-29 13:18:11 +08:00
wnlen 3d6a523d90 feat: add single-line progress for subscription add flow 2026-04-29 12:02:07 +08:00
wnlen c7e6421b66 fix: Adjust the command prompt 2026-04-29 11:42:40 +08:00
Arvin 659ac556be fix(ui): restore utf-8 encoding and remove mojibake in select output 2026-04-25 20:11:07 +08:00
Arvin 631cf35354 feat(completion): add bash and zsh completions 2026-04-24 22:23:47 +08:00
Arvin 24eeddc4ac Update clashctl.sh 2026-04-24 21:53:43 +08:00
Arvin 52ee31ab24 fix(select): make node selection ignore descriptive entries 2026-04-24 17:20:15 +08:00
Arvin 2202bbf7c5 fix(select): block manual node picking for auto strategy groups 2026-04-24 01:13:07 +08:00
Arvin 45a2628807 fix(tun): rollback tun state on config sync failure and stage runtime config apply #223 2026-04-23 23:54:32 +08:00
Arvin 73d2bc0993 migrate mixin to runtime path with legacy compatibility 2026-04-22 15:57:37 +08:00
Arvin 33d4e79f8a fix(select): limit interactive flow to manual selector groups 2026-04-22 09:28:30 +08:00
wnlen 80f11383ac fix: install clashon wrappers and clarify post-install shell behavior 2026-04-20 17:04:11 +08:00
Arvin 3a8d83f3a3 Update clashctl.sh 2026-04-15 00:40:40 +08:00
Arvin da0250bab0 feat: add proxy environment hint before update and upgrade 2026-04-15 00:34:02 +08:00
Arvin dad8337637 refactor: manage controller secret via env instead of mixin 2026-04-15 00:12:02 +08:00
Arvin fa13774880 refactor: manage controller secret via env instead of mixin 2026-04-14 23:54:52 +08:00
Arvin 8ed03f125a feat: support local subscription import and unblock add on broken active source 2026-04-14 17:04:28 +08:00
Arvin 6f1a59109e Update clashctl.sh 2026-04-14 15:15:19 +08:00
Arvin 8f4003b900 fix(select): align selectable node list with submit validation 2026-04-14 13:55:57 +08:00
Arvin dacb0abe6e feat(diagnose): provide contextual suggestions for mixed-port bind failures 2026-04-14 00:42:28 +08:00
Arvin a9b9c3e0de fix(diagnose): detect mixed-port bind denied and port-in-use from runtime logs 2026-04-14 00:25:38 +08:00
Arvin 7ca7a8cf50 fix: degrade clashon when system proxy is not writable 2026-04-13 23:50:25 +08:00
Arvin b101eda0cb fix: keep clashon success path non-fatal and quiet 2026-04-12 22:44:55 +08:00
Arvin c6b9fda8d4 Feature: Split the kernel self-start and the takeover of the boot agent 2026-04-12 21:56:35 +08:00
Arvin 8b58d2e2c1 Add relay CLI for multi-hop proxy groups 2026-04-12 21:23:33 +08:00
Arvin 77b454d6b6 feat: refine install flow, TUN experience, and command UX 2026-04-12 18:24:35 +08:00
Arvin b11b3bffef refine clashctl main path UX and runtime config flow 2026-04-12 15:59:06 +08:00
Arvin 9025dfb7ff Fix: Converge the clashctl CLI and address issues with subscriptions, UI, and the proxy main link. 2026-04-12 09:37:59 +08:00