Follow-up to #9830: audit of all TunModeItem.EnableTun usages found
three more launch-path reads of the live mutable config where the
behavior must agree with the context snapshot that generated the
config:
- CoreConfigClashService (mihomo custom config): the tun section was
decided from the live config while the mihomo launch elevation uses
the snapshot; a mid-reload toggle could produce a config containing
tun launched without sudo, the same failure fixed in #9830. The tun
state is now passed in as a snapshot.
- CoreManager.LoadCore: the Windows RemoveTunDevice cleanup now checks
the main/pre context snapshots.
- CoreManager.WaitForProxyPort: preContext.AppConfig is a shared live
reference; use preContext.IsTunEnabled instead.
Reads that intentionally stay live: StatusBarViewModel (UI state
source), CoreConfigContextBuilder (the snapshot capture point),
GetPreSocksItem (called during snapshot construction, self-consistent),
and AppManager.StatePort2 (transient mid-reload skew only, self-heals
after reload).
* Multi Profile
* VM and wpf
* avalonia
* Fix right click not working
* Exclude specific profile types from selection
* Rename
* Add Policy Group support
* Add generate policy group
* Adjust UI
* Add Proxy Chain support
* Fix
* Add fallback support
* Add PolicyGroup include other Group support
* Add group in traffic splitting support
* Avoid duplicate tags
* Refactor
* Adjust chained proxy, actual outbound is at the top
Based on actual network flow instead of data packets
* Add helper function
* Refactor
* Add chain selection control to group outbounds
* Avoid self-reference
* Fix
* Improves Tun2Socks address handling
* Avoids circular dependency in profile groups
Adds cycle detection to prevent infinite loops when evaluating profile groups.
This ensures that profile group configurations don't result in stack overflow errors when groups reference each other, directly or indirectly.
* Fix
* Fix
* Update ProfileGroupItem.cs
* Refactor
* Remove unnecessary checks
---------
Co-authored-by: 2dust <31833384+2dust@users.noreply.github.com>
When testing server speed, start the Core for each server and generate the same configuration files as when using the server.
Add a folder binConfigs to store temporary configuration files for Core.