Refactor proxy routing and session management

This commit is contained in:
2026-07-08 00:09:38 +03:00
parent c5bdb10445
commit b45dd2ae05
26 changed files with 5193 additions and 307 deletions

View File

@@ -21,6 +21,8 @@ Source configuration is owned by Rust domain models and JSON files under:
C:\ProgramData\VpnProxy\config\profiles.json
C:\ProgramData\VpnProxy\config\targets.json
C:\ProgramData\VpnProxy\config\components.json
C:\ProgramData\VpnProxy\config\local-singbox.json
C:\ProgramData\VpnProxy\state\singbox-subscription-cache.json
C:\ProgramData\VpnProxy\state\activity.json
```
@@ -78,6 +80,25 @@ Installers must be launched intentionally by the user or by a future narrow
helper permission. Profile apply must not silently install Control App,
Proxyfier, or Local sing-box.
Local sing-box install creates this optional runtime:
```text
C:\Program Files\VpnProxy\sing-box\sing-box.exe
C:\Program Files\VpnProxy\sing-box\VpnProxySingBox.exe
Windows service: VpnProxySingBox
```
The install flow downloads `sing-box` from `SagerNet/sing-box` releases and the
WinSW service wrapper from `winsw/winsw` releases, then writes a service config
that points at `C:\ProgramData\VpnProxy\generated\sing-box-config.json`. It
requires UAC confirmation. Uninstall is scoped to the configured
`VpnProxy\sing-box` install root.
The external proxy route remains independent from Local sing-box. Choosing
Local sing-box in the UI generates `sing-box-config.json`, ensures the
`local-singbox` SOCKS5 target at `127.0.0.1:1080`, and then applies ProxiFyre
to that local target.
## Existing Proxyfier Detection
The app detects an already installed Proxyfier layer before showing component
@@ -113,4 +134,5 @@ different profile format.
7. Install and start Local sing-box only when using a local target.
Task evidence is recorded in
`docs/goals/windows-modular-client/EVIDENCE.md`.
`docs/goals/windows-modular-client/EVIDENCE.md` and
`docs/goals/windows-local-singbox/EVIDENCE.md`.