Start persisted running=false, stopped the old core, published the new process and unlocked, installed the firewall rules, DNS hijack, TUN routes or system proxy, and only then persisted running=true. A crash in that window made the next start skip the core and clean only TUN residue, so redirect rules, a hijacked resolver or the system proxy kept pointing at a dead listener. Before it installs anything, Start now stores a host-state marker (the transparent type, API port and TUN teardown settings) and clears it once the start commits or is rolled back; startup and the next Start tear that state down when they find the marker. Every host mutation and the final commit check that the process they started is still the manager's current one, so a core that exits during afterStart fails the start instead of leaving the UI and the store saying running. The system-proxy implementations persist the user's original proxy settings when they capture them and restore from that copy when the in-memory one is gone. A recovery that fails is logged and retried at the next start; it never blocks the service.
v2rayA

v2rayA is a V2Ray client supporting global transparent proxy on Linux, Windows and macOS, it is compatible with SS, SSR, Trojan(trojan-go), Tuic and Juicity protocols. [SSR protocol list]
We are committed to providing the simplest operation and meet most needs.
Thanks to the advantages of Web GUI, you can not only use it on your local computer, but also easily deploy it on a router or NAS.
Project:https://github.com/v2rayA/v2rayA
Usage
v2rayA mainly provides the following methods of installation:
- Install from apt-source or AUR
- Docker
- Our self-built scoop bucket (for Windows users)
- Our self-built homebrew tap
- Our self-built OpenWrt repo and OpenWrt's official repo(from OpenWrt version 22.03)
- Microsoft winget: https://winstall.app/apps/v2rayA.v2rayA
- Ubuntu Snap: https://snapcraft.io/v2raya
- Binary file and installation package from GitHub releases
See v2rayA - Docs
Transparent proxy
On Linux, transparent proxy is available as redirect, tproxy or tun; on Windows and macOS as tun or the system proxy.
tun is built into the core: the core opens a TUN device, assigns its address and takes the default route. Its own connections, the direct outbound and the DNS module's upstream queries never enter the TUN (by socket mark on Linux, by binding to the physical interface on Windows and macOS), and every DNS query an application sends to a public resolver is answered by the core's DNS module. v2rayA and the core are always excluded; other processes can be excluded by executable name in the settings. Connected and static routes always bypass the TUN.
Known limitation: on Windows and macOS an application that queries a LAN resolver directly still bypasses the TUN. The system resolver is pointed at the TUN and is covered.
Screenshots
The dashboard: the core, the node in use, live traffic, the transparent proxy and splitting modes, the members' latency and the subscriptions, each a tile.
The RoutingA editor: rules as a list with a rule editor, or as text with line numbers, colouring and per-line checks; the syntax at hand; import and export.
Statement
- The program does not store any user data in the cloud, and all user data is stored in local.
- Do not use this project for illegal purposes.