Commit Graph
205 Commits
Author SHA1 Message Date
faumarayandClaude Opus 5.5 68b496cafa windows: the component manager, verified programs, a Wine test
components.json pins sing-box, XRay, Flowseal's zapret, bol-van's
winws2 bundle with nfqws2-keenetic's strategies, and tg-ws-proxy (built
with the release): release assets by archive hash, commit snapshots by
the hash of every file taken. The service installs them (admin only),
staged and swapped in, refusing archive paths that leave the directory,
and checks each program against the hashes recorded at install before
running it. stage-components does the same for building a release.

The state root is created with its protected descriptor in one call,
or, existing, checked through a handle that does not follow links.

tools/wine-e2e.sh runs the Windows build under Wine: the service, the
named pipe, impersonation, the component check, rendering and the
supervisor all work; Wine lacks an iphlpapi call sing-box needs, so
proxying itself needs real Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:33:55 +03:00
faumarayandClaude Opus 5.5 b878dd93db windows: an OWNER RIGHTS entry Windows accepts
An empty access mask is refused as an invalid ACL; read-control alone
still takes the owner's implicit WRITE_DAC away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:19:50 +03:00
faumarayandClaude Opus 5.5 cd0bcae4c9 windows: never adopt a state directory someone else made
A root not owned by SYSTEM or Administrators is moved aside; the root
gets SYSTEM as owner and an OWNER RIGHTS entry, so owning a file below
it grants nothing. Adds the pinned component manifest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:19:19 +03:00
faumarayandClaude Opus 5.5 d678976c2d windows: protect the state directory, names that become files, logs
The state directory gets a protected DACL (SYSTEM and Administrators)
at every start; on Windows programs run only from its bin\, never from
PATH; rule-set and geodata names are validated before they become file
names, and checked again where they do; logs need the secrets scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:16:40 +03:00
faumarayandClaude Opus 5.5 41c8ed4406 windows: the service, its API and proxy-ctl
ps-ipc: line-delimited JSON over a named pipe whose ACL admits SYSTEM,
Administrators and (with userControl) the interactive user; the caller
is identified by impersonation, never by what it claims. A Unix socket
stands in off Windows.

ps-service (proxy-suite-service.exe): a Windows service, or --console.
Keeps the configuration with revisions, runtime state and generated
secrets; renders, checks with sing-box check before replacing what
runs, and supervises the backends (restart with backoff, start limit,
logs in a ring and a file, a Job Object on Windows). Enforces scopes,
admin-only edits and secret redaction that round-trips. Fetches
subscriptions and rule sets through the proxy or directly with
upstream's redirect rules, on timers.

ps-ctl (proxy-ctl.exe): status, restart, logs [-f], config get/set/
validate, and proxy on/off, outbounds, pin, mode, subs, rules,
rulesets, tun and config.

An end-to-end test runs it all offline: a sing-box Shadowsocks server,
the service, proxy-ctl adding the outbound, a page fetched through the
local proxy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:13:19 +03:00
faumarayandClaude Opus 5.5 918cdc9a75 windows: rules and per-app profiles fail closed
A rule, an outbound's own routing or a per-app profile whose outbound is
not running blocks what it matches instead of letting it fall through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:58:28 +03:00
faumarayandClaude Opus 5.5 130c020151 windows: refuse loopback through the proxy; Clash API always has a secret
Per-app rules naming an outbound that is not running are left out with a
warning instead of failing the start, and failover renders as sing-box's
own urltest until the service drives it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:57:06 +03:00
faumarayandClaude Opus 5.5 3665f7f5a0 windows: render sing-box and hybrid configs
ps-core::render builds what upstream's start scripts assemble with bash
and jq: every outbound (declared, subscriptions, SSH, Tor, WARP and AWG
as WireGuard endpoints, joiners, wireproxy hops), chains, groups, the
pin and the 'proxy' selector per selection mode, routing sections by
priority with route modes and the DNS mirror, rule sets, TUN with fake
IP, the Clash API, per-app rules by program, and the hybrid XRay
sidecar. Integration tests run sing-box check and xray -test on the
results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:51:30 +03:00
faumarayandClaude Opus 5.5 c01538fec9 windows: raw backend JSON is always admin-only; WireGuard profiles
Telling path-shaped values from addresses on Windows (drive letters,
UNC, device paths, sockets) is too easy to get wrong, so raw sing-box
and XRay JSON now needs an administrator outright. ps-core::wg parses
WireGuard/AmneziaWG profiles into sing-box endpoints, as upstream's
warp_outbound.py does. Routing rules gain name, priority and disabled
for proxy-ctl proxy rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:44:31 +03:00
faumarayandClaude Opus 5.5 96958c4e61 windows: close gaps in the admin-only edit check
Null-to-object changes are looked into, keys named just 'file' count,
raw inbound XRay JSON is admin-only outright, and raw outbound JSON is
admin-only when it runs Tor or holds a path-like value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:41:57 +03:00
faumarayandClaude Opus 5.5 77d4cefe0e windows: share-link and subscription parsing, admin-only edits
ps-core::links ports upstream's proxy_url_parsers.py and proxy_parsing.py:
every scheme, each backend's refusals, XRay rendering, subscription
decoding, tags and the server checks. Upstream's build-outbound tests
are ported case for case, and tools/parity/links.py runs ~750 links
through both implementations: no differences.

config::privileged_changes names the edits only an administrator may
make: anything that runs a program, passes arguments through, or names
a local file, since the service runs as LocalSystem. Names that become
paths or service names are validated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:38:56 +03:00
faumarayandClaude Opus 5.5 c837db1c18 windows: workspace, dev shell and the config model
Start of the native Windows port. windows/ holds a Rust workspace; this
first piece is ps-core's model of the services.proxy-suite option tree,
with upstream's names and defaults, Windows-only additions documented,
validation ported from the module's assertions, and the derived tags and
loopback ports the tunnels add.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:28:10 +03:00
FUFSoB 9d81e975ea fix: disabling z2 autolearn behavior 2026-10-25 19:00:36 +05:00
FUFSoB a60b2a1286 fix: stale xray hash 2026-10-24 13:21:54 +05:00
FUFSoB 564ea9e24f fix: zapret2 fixes and xray update 2026-10-23 23:56:33 +05:00
FUFSoB 20f1bdd110 fix: zapret2 file permission fixes 2026-10-21 21:51:39 +05:00
FUFSoB a41fbc10e6 feat: xhttp xmux 2026-10-18 16:53:08 +05:00
fufsob 2fc8ef5567 chore(ci): bump gh actions (#16 #17 #18 #19), group dependabot updates 2026-10-18 05:46:25 +00:00
fufsob c39921a72c fix: z2k deps + better ci 2026-10-18 05:19:40 +00:00
FUFSoB 9f7ad91f39 feat: better inbounds user management 2026-10-14 21:41:49 +05:00
github-actions[bot]andFUFSoB 2f8414455d chore(deps): refresh flake inputs and pinned sources (#15)
Co-authored-by: FUFSoB <32937947+FUFSoB@users.noreply.github.com>
2026-10-12 19:48:23 +05:00
fufsob 2be98214ed feat: tor keep awake 2026-10-12 03:24:23 +00:00
fufsob 7d96e7c6f8 feat: hysteria2 x-forward 2026-10-11 16:27:16 +00:00
fufsob cae589626a feat: hy2 host rewrite 2026-10-11 16:27:16 +00:00
FUFSoB 5045c13153 fix: chained proxy bug 2026-10-11 21:14:04 +05:00
FUFSoB e293efd1c1 feat: debug options 2026-10-11 11:18:48 +05:00
FUFSoB cacd51595c feat: params in gui/tui 2026-10-10 23:17:44 +05:00
fufsob 584c8ba0a0 feat: runtime routing 2026-10-10 16:33:24 +00:00
FUFSoB d70bcb317f feat: per-app keep-running 2026-10-10 16:19:54 +05:00
FUFSoB 91f2397ac5 feat: zapret2 lists domain for learned to proxy ips 2026-10-06 20:42:00 +05:00
github-actions[bot]andFUFSoB 57fdbf3e08 chore(deps): refresh flake inputs and pinned sources (#14)
Co-authored-by: FUFSoB <32937947+FUFSoB@users.noreply.github.com>
2026-10-06 10:30:53 +05:00
fufsob 41d3575345 fix: update workflow fixes 2026-10-06 05:04:50 +00:00
FUFSoB a435942b4f fix: hardening 2026-10-05 22:44:09 +05:00
FUFSoB 017a947a18 fix: zapret2 improvements 2026-10-04 19:43:32 +05:00
FUFSoB 2452d6fbe1 fix: better logs and zapret2 2026-10-04 17:43:33 +05:00
FUFSoB 552bfd53b1 fix: zapret2 improvements 2026-10-04 17:07:45 +05:00
FUFSoB 65082aad88 feat: per-app awg and custom via 2026-10-04 15:39:56 +05:00
fufsob af5b3ff27a refactor: move out large code blocks out of nix 2026-10-04 11:54:04 +05:00
fufsob e8ace6523d fix: h3 showed ping timeout 2026-10-03 16:42:00 +00:00
fufsob 1fc6c27489 feat: share-variants 2026-10-03 16:24:11 +00:00
fufsob 194742c956 fix: sub updater restart sing-box only if smth updated 2026-10-03 14:26:40 +00:00
FUFSoB 0d13822175 feat: zapret2 shows strategies applied 2026-09-30 22:25:40 +05:00
FUFSoB 730671ea0c fix: z2k strategies fix 2026-09-30 19:31:26 +05:00
fufsob c1e4425d18 fix: more hardening 2026-09-30 13:27:55 +00:00
fufsob 18a2049a1c fix: hardening 2026-09-30 09:16:21 +00:00
FUFSoB f609334849 fix: proxy-ctl test fix 2026-09-29 19:47:51 +05:00
fufsob fa0015d829 feat: outbound groups 2026-09-29 13:01:31 +00:00
fufsob c42bcb2f4f feat: follow logs is scrollable 2026-09-29 09:30:54 +00:00
fufsob 3e141b46fc refactor: better binds in tui/gui 2026-09-29 09:16:07 +00:00
fufsob 9bbffe24b4 feat: runtime users and inbounds 2026-09-29 08:11:29 +00:00