Commit Graph
32 Commits
Author SHA1 Message Date
faumarayandClaude Opus 5.5 7565e62571 windows: the app sets the system proxy; ps-core lint fixes
- The app points the signed-in user's system proxy (WinINet: browsers
  and most programs follow it) at the local proxy while it runs and
  proxy.systemProxy.enable asks; the user's own settings are kept and put
  back when the proxy stops, the service goes, the option is turned off
  or the app quits; one left behind by a killed app is cleared. A switch
  for it on the overview. Elsewhere than Windows it does nothing.
- ps-core: clippy's collapsible ifs, comparisons without owned values, a
  range loop without indexing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 02:07:02 +03:00
faumarayandClaude Opus 5.5 77becc235c windows: the app's tray, and its Windows build from Linux
- Tray (gpui-tray): a shield coloured by how things are (working, one
  failed, all off, no service), its tooltip saying which; the menu opens
  the window and switches the local proxy, the DPI bypass and the Telegram
  proxy, with their states checked; Quit. Closing the window leaves the
  app in the tray (no tray: it quits); --hidden starts it there.
- The app builds for Windows from Linux: GPUI compiles its HLSL shaders
  with fxc.exe only when the building machine is Windows, so its Windows
  backend is vendored with that one check made on the target instead
  (vendor/gpui-pre-windows/PATCHED.md, tools/vendor-gpui-windows.py), and
  tools/fxc-wine.sh runs Microsoft's fxc.exe under Wine: the compiler from
  the Windows SDK 10.0.26100 installer, pinned by hash, kept on the build
  machine; only the compiled shaders go into the app.
- gui-shot.sh keeps the app off the desktop's session bus.

Under Wine the app starts but cannot draw text (Wine's DirectWrite does
not implement font-set matching), so its Windows rendering is untested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 02:03:18 +03:00
faumarayandClaude Opus 5.5 a7bf347859 windows: the app's Components page; the connection in the sidebar
- Components: each program's pinned version, the one installed (or
  missing), its license and source; fetching them all again, which the
  service allows administrators only, with each failure named.
- The sidebar's foot says whether the service is reachable, and
  "Applying…" while a change is under way; when it is not running, the
  overview says how to start it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:46:58 +03:00
faumarayandClaude Opus 5.5 69759cfbce windows: the app's Settings page: the whole configuration
Upstream's option tree as JSON in a code editor (highlighted, folding),
loaded with its revision; Check asks the service to validate without
taking it; Save sends it against the revision loaded, so a change made
elsewhere meanwhile is refused, not overwritten, and the page says so.
The validator's notes and an apply failure are shown under the editor;
redacted secrets are explained (left as they are, they keep their
values). Every option the other pages do not show is editable here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:44:55 +03:00
faumarayandClaude Opus 5.5 23c1687118 windows: the app's Logs page; on Linux, units end with the service
- Logs: every unit's as they come (the last 500 first, 5000 kept), one
  unit's on its own, following or held; terminal colours stripped; a
  virtual list, so thousands of lines cost nothing. The follow starts
  when the page is first opened and reconnects by itself.
- Linux (development, tests): the service's children get SIGKILL when it
  dies (PR_SET_PDEATHSIG), as the Job Object does on Windows; a killed
  service no longer leaves sing-box running (the e2e test leaked one per
  run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:41:12 +03:00
faumarayandClaude Opus 5.5 a839d48e02 windows: the app's Outbounds page
Adding an outbound from a share link or a backend's JSON (checked here
first, by the same parser as proxy-ctl; tagged from the link unless
named); the list with each one's source, backend and detour, pinned or
left out, its delay on request, and remove for the user's own; the
routing mode; subscriptions added, updated and removed.

dev-service.sh: the demo server resolves names over HTTPS (sing-box needs
a resolver for its direct outbound, and plain DNS may be blocked).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:37:02 +03:00
faumarayandClaude Opus 5.5 7dfb3129f4 windows: the app's Telegram proxy page
tg-ws-proxy on or off and its state; its tg:// links, to copy or open in
Telegram (none without the secrets scope, and the page says so); whether
other devices may connect; its port and fake-TLS domain (which adds the
ee link). Long links are cut short rather than widening the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:33:10 +03:00
faumarayandClaude Opus 5.5 c9ce7a1982 windows: the app's DPI bypass page
zapret on or off and its engine; for Flowseal's presets, the preset (the
release's own list, matched as the service matches names) and game
traffic; for zapret2, learning, IPv6 and the strategy log; the sites to
handle besides the engine's lists and the sites to leave alone; TCP
timestamps. News from the service replaces what the user has not
changed, never what they are typing; a save shows the list as saved.

ps-client: set_path for any one option, set_zapret_sites (tidied,
deduplicated). gui-shot.sh takes ordered steps: click, type, key, wait.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:30:25 +03:00
faumarayandClaude Opus 5.5 d3ba00087d windows: the app's skeleton: the service from GPUI, an overview
- bridge: ps-client on a tokio runtime of its own, awaited from GPUI's
  executor; log following as a channel that reconnects.
- model: status polled every 2 s (outbounds every fifth round and on a
  reconnect), the zapret presets and tg links on connecting, and changes
  sent through ps-client's edits; what came of each is a notification,
  the service's own words when it refuses or cannot apply.
- The window: a sidebar of pages; the overview shows the local proxy, the
  DPI bypass and the Telegram proxy with their states and switches, and
  what the service warns of. The other pages come next.
- Icons: the components' own and the few the app adds, not all of Lucide.
- zapret's engines by upstream's names (zapret-discord-youtube, zapret2).
- gui-shot.sh can click before the shot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:25:11 +03:00
faumarayandClaude Opus 5.5 63aede0dc1 windows: the service names zapret's presets and tg-ws-proxy's links
- 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>
2026-10-27 01:18:59 +03:00
faumarayandClaude Opus 5.5 4ae30dac3c windows: ps-client shared by proxy-ctl and the app; the app's first window
- 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>
2026-10-27 01:13:28 +03:00
faumarayandClaude Opus 5.5 da6aafaf1d windows: release through Gitea Actions
Windows release / build (push) Successful in 3m37s
Windows release / publish (push) Successful in 15s
.gitea/workflows/windows-release.yml builds the Windows release in the
repository's own Nix dev shell (pinned Nix installer, checked by hash),
tests, packages, and on a tag windows-v<version> publishes the zip and
its .sha256 to a Gitea release with windows/release-notes/<version>.md.
Run by hand it only builds. As upstream's workflow: the job that runs
fetched code holds no token that can write; only the publishing job sees
RELEASE_TOKEN, and it runs curl and jq on the first job's artifact.

rust-toolchain.toml pins the toolchain the release is built with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 00:54:49 +03:00
faumarayandClaude Opus 5.5 363caf912a windows: a failed check of the state root is made again (0.1.0-pre.2)
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>
2026-10-27 00:51:32 +03:00
faumarayandClaude Opus 5.5 e84d42a10c windows: 0.1.0-pre.1: README, install.cmd, release packaging
- README for the Windows port: what this release does, what has been
  verified and how, install, first run, who may change what, caveats.
- install.cmd / uninstall.cmd ask for administrator rights and run the
  service's own install/uninstall.
- tools/package.sh builds the release zip with every component staged
  and pinned; tools/wine-install-test.sh exercises install, the pipe and
  uninstall under Wine's Service Control Manager.
- Release profile: thin LTO, stripped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 00:41:53 +03:00
faumarayandClaude Opus 5.5 8af7b2e628 windows: authorize streamed requests, self-removal on uninstall, tun on
- 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>
2026-10-27 00:41:53 +03:00
faumarayandClaude Opus 5.5 28cc7b2cbe windows: install into Program Files, seed components, log as a service
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>
2026-10-27 00:10:26 +03:00
faumarayandClaude Opus 5.5 d1bce9db94 windows: zapret site names and addresses are validated
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>
2026-10-27 00:07:38 +03:00
faumarayandClaude Opus 5.5 bceb754e65 windows: zapret2 on winws2 with nfqws2-keenetic's strategies
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>
2026-10-27 00:04:21 +03:00
faumarayandClaude Opus 5.5 9b0d7021f9 windows: zapret-discord-youtube and tg-ws-proxy
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>
2026-10-26 23:55:45 +03:00
faumarayandClaude Opus 5.5 817de77d28 windows: wine-e2e reads the logs before matching them
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:35:15 +03:00
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