Commit Graph

234 Commits

Author SHA1 Message Date
chen08209 12403b063a build: target Android SDK 37, use Rust 1.98.1 and add a safe mode run
Moves to AGP 9.4.1 and Gradle 9.8.0; Rust 1.98.1 lets macOS 27 load
rust_api. Android 17 treats the tun subnet as local network, so starting
the VPN asks for that permission and falls back to gvisor without it.
Signed release builds upload native symbols to Crashlytics.
2026-09-30 11:39:58 +08:00
chen08209 c7be7023d3 docs(readme): replace the demo gifs with a desktop and mobile device mockup 2026-09-17 09:50:07 +08:00
chen08209 7c61c90ac2 chore(release): v0.8.98 v0.8.98 2026-09-14 10:40:41 +08:00
chen08209 c5bf5bd487 fix(resources): refresh geo file info once the core finishes updating
The file info was re-read as soon as the update RPC returned, before the
core had finished writing the file, so the list kept showing the old size
and time. Refresh when the updating key clears instead, which also covers
automatic and core-initiated updates.

Changelog: Refresh the geo file size and time after an update finishes
2026-09-14 10:40:15 +08:00
chen08209 60f371afd8 fix(core): keep the IPC connection while a half-written frame waits on a suspended host
Windows Modern Standby suspends the app while the Helper's Core keeps
running, so a frame that was half written when the host stopped draining
timed out and closed the connection, which ended the Core with it. A
timed-out write on a half-written frame is now resumed for as long as the
stall lasts, and only a hard error still closes. go-winio reports the
expiry as its own ErrTimeout, so the check goes through Timeout().

Changelog: Keep the core running while Windows sleeps with the app suspended
2026-09-14 10:40:15 +08:00
chen08209 db03880579 chore(release): v0.8.97 v0.8.97 2026-09-10 13:26:09 +08:00
chen08209 d0b1562e1d ci: split the test job into parallel jobs and cache gradle and cargo
Run Dart, plugin, Go, Android and Rust checks as separate jobs so the
critical path is the longest one instead of their sum. Android unit
tests exclude the Flutter compile tasks, which used to run the native
build hooks for every debug ABI. Gradle and cargo outputs are cached.
Release builds keep the master channel: stable publishes no Windows or
Linux arm64 SDK archive, so the action must clone the SDK there.

Changelog: skip
2026-09-10 12:43:00 +08:00
chen08209 26cfbaf456 refactor(ui): migrate to material_ui and rework views, widgets, empty states, and localization
Rebuild views, widgets, and pages on material_ui with typed enum labels
replacing runtime Intl.message lookups, and retranslated ja/ru plus
polished en/zh arb files. Includes the MATCH-TARGET rule placement
option for profile overwrites, animated connection list changes, full
proxy chains on connection and request items, a floating time hint
beside the scrollbar, FAB-aware list insets, and anchored paused log
and request lists while the buffer trims.

The basic configuration page is grouped into Inbound, Authentication,
and Other sections, with the credentials block shown only while
authentication is on and blank credentials rejected after normalizing.
Selection sheets open scrolled to the current selection, scroll bars
stay out of blurred sheet headers and show on mobile, connections sort
by total traffic and the list no longer crashes when a row leaves before
it grows in, and the Android notification stop button has a switch.

Empty states get semantic illustrations on Material shapes, and
NullStatusSwitcher crosses between an empty state and its content with a
fade-through and a fast exit instead of a hard cut. NullStatus scales its
illustration in and slides the label, description, and action up in a
stagger, the enter boxes honor the reduced-motion setting without running
their controllers, and an empty state built while its route is still
entering skips the entrance the route already animates. The custom rule
editor's no-resolve and src switches write back through the rule
provider, its delete action works, and long type, rule-set and target
names clip with a tooltip.

Changelog: Rework the app UI and refresh the localization
2026-09-10 12:43:00 +08:00
chen08209 aaf934c2d1 refactor(app): rebuild core client, providers, models, database, managers, and window handling
Rework the application layer end to end: core IPC client, providers,
models, database, managers, and shared utilities, with riverpod 3.4.2
and freezed 4.0.1. Keep a rejected profile selected, push the empty
config to Core when a profile fails to build, and fall back to the
default activity icon for package icons.

Add opt-in proxy authentication that injects credentials into the
generated profile and the runtime config, force-clears profile-provided
skip-auth-prefixes so loopback stays covered, sends the credentials with
the app's own proxied requests, and withholds the Android VPN system
proxy while credentials are set. HelperCoreLease treats an unreachable
Helper as confirmation once the OS reports the Core pid gone, and the
lifecycle reconcile retries a parked stop, so the Core comes back after
the Helper service dies. Launch arguments seed LinkManager so a clash://
link raises a silently started window, the access control app list is
fetched on every page entry, the desktop header matches a standard title
bar height, and the tray icons ship as resolution-aware assets scoped per
platform. The version moves to 0.8.97+2026090101.

Rule.parse mirrors mihomo's ParseRulePayload: the type is
case-insensitive, MATCH rules keep no content field, a two-field rule is
payload without a target except for comma-payload types whose lone field
is the target, params are matched whole, and the wildcard and
REMATCH-NAME types the core accepts get their own actions instead of
collapsing into DOMAIN. Window routes show, hide and toggle through one
serialized queue and defers the macOS accessory activation switch until
a second after the last regular switch, so hotkey bursts no longer leave
stray Dock icons. The hotkey manager registers through rust_api instead
of hotkey_manager, the window header restyles the caption buttons after
the native Windows title bar, and the proxies tab keeps its tab
controller alive while the empty state animates in. Bootstrap reads the
Android dynamic palette from the plugin channel without the deprecated
CorePalette, dynamic_color moves to its material_ui release,
navigator_resizable 3.1.0 fixes an assertion when popping
mid-transition, reorderable_grid goes, and the SDK floor rises to 3.10.

Changelog: Rework the app layer and window handling, and add proxy authentication
2026-09-10 12:43:00 +08:00
chen08209 c0fcbc03ee feat(desktop): rework the windows, linux, and macos runners, packaging, and native build
Update the runner projects for the reworked plugins. The Windows runner
asks the plugin for the running window before booting a second instance
and forwards a clash:// link through app_links; the Linux runner routes a
relaunch to the primary through GApplication; the macOS delegate forwards
applicationShouldHandleReopen to the plugin. The Linux desktop entries
claim the clash, clashmeta, and flclash schemes, and the rpm spec stops
stripping the Core whose hash the Helper validates.

The runner projects consume the setup build hook's artifacts: macOS drops
the CocoaPods integration and its script phase, pins release ARCHS to the
host, and stages the Core after the hook may have rewritten it; Windows
and Linux copy the Core, Helper and manifest from the CMake install
rules, and a Debug install on Windows stops a Helper that holds its exe
open, matched by executable path so a registered release Helper keeps
running. The deb depends on the appindicator runtime library instead of
its development package, and the keybinder dependency and README lines
go with hotkey_manager.

Changelog: Rework the desktop runners, packaging, and native build
2026-09-10 12:43:00 +08:00
chen08209 ae29f38f6b feat(android): rework the VPN service, tile, lifecycle arbitration, and native build
ServiceState serializes start, stop, and restart intents so the latest
request wins, and switching between VPN and proxy mode tears the previous
service down the way stop() does before binding the next one, so a
system-started VpnService no longer outlives the switch. The package
resolver drops its cache on package add, replace, and remove broadcasts
and notifies Flutter, and the persistent notification can omit its stop
action through an application setting synced over the shared state.

The :core module takes the NDK clang directory and API level from the
setup build hook input instead of ANDROID_NDK and a hardcoded API 21, and
derives its ABI list from the target-platform property so a single-ABI
build no longer links ABIs the hook did not produce.

Changelog: Rework the Android VPN service and lifecycle handling
2026-09-10 12:42:59 +08:00
chen08209 adf715f8ac refactor(plugins): rework desktop plugins and add rust_api, the helper service, and build hooks
Replace window_ext with a first-party tray plugin that loads multi-size
ICO and resolution variants, rework setup, proxy, and wifi_ssid, and add
the Rust API plugin and the desktop Helper service.

The Helper now also serves Linux: setup installs it as a systemd unit on
demand from authorizeCore(), refusing a Helper binary that is not
root-owned or a unit installed for another UID, and it listens on
/run/flclash/helper.sock filtered by SO_PEERCRED against the installing
UID. /start requires the Core address to be a socket owned by the owner
UID, the listener survives accept() errors, and SIGTERM reaches the Core
teardown. Hosts without systemd keep the setuid Core, and an AppImage
reports TUN authorization as unavailable. The Dart-side IPC socket is
bound at 0600 and admits only a peer whose effective uid is the app's
own or root, since the Core connects as root under setuid or the Helper.
Override scripts resolve a main declared with const or let.

rust_api upgrades flutter_rust_bridge to 2.13.0 and builds through
Native Assets: the vendored Cargokit harness and the per-platform FFI
scaffold give way to a Dart build hook on flutter_rust_bridge_hooks, the
crate pins its toolchain and targets in rust-toolchain.toml, and the hook
exports the NDK libclang directory that rquickjs's bindgen needs on
Android, probing lib and lib64 and failing with a clear message when
neither holds it. It also replaces hotkey_manager: the crate wraps the
tauri global-hotkey crate, keys arrive as Flutter USB HID usages,
registration runs on the thread each platform binds it to (a
message-loop thread on Windows, the main queue on macOS), presses stream
back to Dart as action ids, and Linux stays X11 only and reports a
missing DISPLAY instead of registering silently.

setup builds the Go core and the Rust Helper through a Dart build hook in
place of the buildkit glue. Flutter runs the hook before every platform
build and flutter test, once per target architecture; it constructs
CoreBuilder from the setup_hooks package, which turns the hook input into
a BuildRequest, compiles the Core and, on Linux and Windows, the Helper
and manifest, and reports the files it read and the directories it wrote
as hook dependencies. setup_hooks keeps a fingerprint cache under
.dart_tool/setup_build_cache keyed on go list -deps inputs, module files,
build config, harness sources and toolchain versions; builds run in a
staging directory and move into place on success, and everything the
hook prints is mirrored into hook.log, which keeps appending when a
rotation fails. Hook failures reach the runner as BuildError or
InfraError, filesystem errors included.

Changelog: Rework the desktop plugins and add the Helper service and Rust bridge
2026-09-10 12:42:59 +08:00
chen08209 c6eaa0a68b refactor(core): rebuild the Go core IPC, hub, and ownership model
Rebuild the IPC server, hub, tiered message queues, and the file
ownership reclaim a setuid or Helper-spawned Core performs, and move the
Clash.Meta fork forward. UpdateParams carries the authentication users
the app injects at runtime.

Changelog: Rework the core IPC and process lifecycle
2026-09-10 12:42:59 +08:00
chen08209 96fcb9ab5e chore(agents,tool): rebuild agent config, lint gates, CI, and release tooling
Rework .agents/, Claude/Codex config, CI workflows, lint gates and
lint-rule tests, and the release/changelog tooling. The 5% comment
density gate stays diff-scoped inside git hooks, where GIT_DIR outranks
the -C the gate uses to locate the repository. The tray icon generator
writes multi-size ICO files from the SVG sources into the per-platform
tray asset directories. The custom code-review subagents are gone: the
built-in /code-review never dispatched them, and the subagent model now
lives in a user-level setting outside the repository.

The Makefile, build_config.yaml and CI hand the Core and Helper builds to
the setup build hook, so the buildkit launchers go, and setup.dart
packages AppImage and rpm on arm64 with flutter_distributor pinned to the
fork tag that normalizes packaging permissions.

Changelog: skip
2026-09-10 12:42:52 +08:00
chen08209 62addf738a Update changelog 2026-08-17 07:29:13 +00:00
chen08209 e2f678909d Optimize commented policy v0.8.96 2026-08-17 14:50:35 +08:00
chen08209 7fb4f4f711 Fix whole group delay test failing on Windows 2026-08-17 14:49:53 +08:00
chen08209 903e2b8879 Optimize package icon loading and connections polling 2026-08-17 14:49:53 +08:00
chen08209 2df430ca31 Update changelog 2026-08-14 07:06:49 +00:00
chen08209 aee7ee2643 Optimize core service v0.8.95 2026-08-14 14:36:25 +08:00
chen08209 9a99897864 Optimize Android TV launcher icon 2026-08-14 14:35:10 +08:00
chen08209 4551e57ff4 Optimize back navigation 2026-08-14 14:35:09 +08:00
chen08209 1cffeaa29e Optimize more details 2026-08-14 14:35:09 +08:00
chen08209 5f2c12642b Fix some issues 2026-08-14 14:35:09 +08:00
chen08209 c493df386d Optimize app layout 2026-08-14 14:35:09 +08:00
chen08209 425d32b50d Optimize focus control 2026-08-14 14:35:09 +08:00
chen08209 51e24ef9de Adjust android process 2026-08-14 14:35:08 +08:00
chen08209 7c831855ef Update changelog 2026-07-11 12:35:22 +00:00
chen08209 7e7f1f89f3 Fix macos performance issue
Support custom global-ua

Update core

Optimize some details
v0.8.94
2026-07-11 20:13:36 +08:00
BIGGASSS 5179d55dfb Fix linux silent launching not working 2026-07-11 19:12:15 +08:00
chen08209 ac2f6b919e Update changelog 2026-05-29 06:55:29 +00:00
chen08209 45015f856b Support custom overwrite
Support run on demand

Optimize windows ipc

Optimize windows arm64

Optimize build

Optimize some details

Update core
v0.8.93
2026-05-29 14:35:56 +08:00
chen08209 672eaccd35 Update changelog 2026-02-02 02:38:00 +00:00
chen08209 2fbb96f5c1 Add sqlite store
Optimize android quick action

Optimize backup and restore

Optimize more details
v0.8.92
2026-02-02 10:15:42 +08:00
chen08209 243b3037d9 Update changelog 2025-12-12 06:52:14 +00:00
chen08209 6e404ab19c Fix windows some issues
Optimize overwrite handle

Optimize access control page

Optimize some details
v0.8.91
2025-12-12 14:33:03 +08:00
chen08209 2395a4b20c Update changelog 2025-10-08 08:41:35 +00:00
chen08209 d3c3f04062 Fix android tile service
Support append system DNS

Fix some issues
v0.8.90
2025-10-08 16:28:02 +08:00
chen08209 201062dc5d Update changelog 2025-09-27 07:31:55 +00:00
chen08209 45b163184d Fix some issues
Optimize Windows service mode

Update core
v0.8.89
2025-09-27 15:17:19 +08:00
chen08209 2ab70f193a Update changelog 2025-09-23 07:44:50 +00:00
chen08209 ed7868282a Add android separates the core process
Support core status check and force restart

Optimize proxies page and access page

Update flutter and pub dependencies

Update go version

Optimize more details
v0.8.88
2025-09-23 15:23:58 +08:00
chen08209 e956373ef4 Update changelog 2025-07-29 02:57:43 +00:00
chen08209 1154e7b245 Optimize desktop view
Optimize logs, requests, connection pages

Optimize windows tray auto hide

Optimize some details

Update core
v0.8.87
2025-07-29 10:43:05 +08:00
chen08209 adb890d763 Update changelog 2025-06-15 10:59:15 +00:00
chen08209 1477f9bd9c Fix windows tun issues
Optimize android get system dns

Optimize more details
v0.8.86
2025-06-15 18:44:19 +08:00
chen08209 a06e813249 Update changelog 2025-06-07 16:08:38 +00:00
chen08209 afbc5adb05 Support override script
Support proxies search

Support svg display

Optimize config persistence

Add some scenes auto close connections

Update core

Optimize more details
v0.8.85
2025-06-07 23:52:27 +08:00
chen08209 76c9f08d4a Fix issues that TUN repeat failed to open. v0.8.84 2025-05-01 22:12:05 +08:00
chen08209 f83a8e0cce Update changelog 2025-05-01 13:03:36 +00:00