- zapret-presets: the presets of the installed zapret release and the one
configured; proxy-ctl zapret presets.
- tg-links: tg-ws-proxy's tg:// links (dd, and ee with a fake-TLS
domain), as it prints them; they carry its secret, so the secrets scope.
proxy-ctl tg link. No more reading them out of its log.
- tools/dev-service.sh: the service on Linux with a demo outbound, for
working on the app.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ps-client: the service's client side, moved out of proxy-ctl: calls,
configuration edits against the revision read (retried on a concurrent
change), log following, and the edits themselves as functions on the
configuration (outbounds, subscriptions, rules, zapret, tg-ws-proxy),
now unit-tested. proxy-ctl does what it did, through it; a refused log
follow is now an error instead of nothing.
- ps-gui: proxy-suite, the desktop app on GPUI (gpui-kit 0.8.1); only a
first window yet. Not in default-members: plain cargo build/test and the
release workflow's tests leave GPUI out.
- tools/gui-shot.sh: runs the app on Xvfb with Mesa's software Vulkan and
screenshots it, to check the GUI on Linux without a display.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The once-per-process guard recorded the root before ensure_root ran. A
first check that failed (the service log's create_all ignores its error)
left the root marked as checked, so run()'s create_all skipped the check
and the service went on with a root it could not secure, and runs what
is under its bin\ as SYSTEM. Now only a check that passed is recorded,
under the lock, and a failed one fails again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Every request is authorized before it is handled, including `logs -f`,
which skipped the check.
- The state root is checked once per process: a second check under Wine
moved the live root (and its log) aside.
- uninstall removes Program Files after it exits: cmd got a garbled
quoted command line; it now runs raw, outside the folder, windowless.
- install no longer fails when the first start does; it says how to start.
- `proxy-ctl proxy tun on` also turns on proxy.tun.enable.
- build-tg-ws-proxy.sh resolves its output path before changing directory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
install copies the release into %ProgramFiles%\ProxySuite (upgrading in
place when the service exists), registers it there, and puts it on the
system PATH: a copy in Downloads could be replaced by any user, and the
service runs it as SYSTEM. uninstall removes the service, the PATH
entry and the program files, and leaves the state.
At every start the service copies the release's components into bin\
when they are newer, staged and verified file by file, and only from a
service running in Program Files. Under the Service Control Manager it
logs to logs\service.log, reports StartPending until the API listens,
and a failed start as a service-specific error.
zapret refuses to start while Flowseal's, the win bundle's or
GoodbyeDPI's service holds WinDivert, and says which to remove.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A zapret2 domain is split into winws2's arguments: one carrying
whitespace could add an argument of its own (a --lua-init running as
SYSTEM). Names and addresses are checked in validation and filtered
again where the command line is built.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ps-core::zapret2 reads nfqws2-keenetic's nfqws2.conf and patches it as
upstream's sources.nix does, expands the hostlist markers as zapret2's
list.sh does (autohostlist with its detector settings, the configured
domains), fills circular's unset detector settings from autoHostlist,
merges the extra ports into the profiles that tell traffic by protocol,
and gives winws2 WinDivert port filters in place of the queue's rules.
The service runs it with the learned list in a directory labelled Low
integrity, where winws2 can still write once it drops to Low. winws2
verifies the whole command line under Wine.
detect.lua, z2k and the cutoff probe are not there yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zapret: Flowseal's release run as its service.bat runs it: the preset's
winws.exe line (continuations, cmd's caret escapes, %BIN%, %LISTS%, the
game filter) as winws's arguments, the user's domains and addresses in
the lists upstream's module puts them in (kept in the service's own run
directory, the verified release untouched), TCP timestamps on, and
zapret's sites in the proxy's direct list. tools/winws-dry-run.sh has
the release's own winws.exe verify every preset's arguments under Wine:
all 22, both game filters.
tg-ws-proxy: Flowseal's headless proxy on the embeddable CPython 3.12
with hash-pinned win_amd64 wheels (tools/build-tg-ws-proxy.sh), run with
upstream's flags; its relay goes direct under the TUN. Runs under Wine.
proxy-ctl: zapret status|on|off|preset|game-filter, components
list|install.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>