2 Commits
Author SHA1 Message Date
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
14 changed files with 342 additions and 20 deletions

No files matched your search

+1
View File
@@ -1 +1,2 @@
target/
dist/
+4 -4
View File
@@ -879,7 +879,7 @@ dependencies = [
[[package]]
name = "ps-core"
version = "0.1.0"
version = "0.1.0-pre.1"
dependencies = [
"base64 0.22.1",
"indexmap",
@@ -893,7 +893,7 @@ dependencies = [
[[package]]
name = "ps-ctl"
version = "0.1.0"
version = "0.1.0-pre.1"
dependencies = [
"anyhow",
"clap",
@@ -905,7 +905,7 @@ dependencies = [
[[package]]
name = "ps-ipc"
version = "0.1.0"
version = "0.1.0-pre.1"
dependencies = [
"serde",
"serde_json",
@@ -916,7 +916,7 @@ dependencies = [
[[package]]
name = "ps-service"
version = "0.1.0"
version = "0.1.0-pre.1"
dependencies = [
"anyhow",
"clap",
+6 -1
View File
@@ -3,7 +3,7 @@ resolver = "2"
members = ["crates/ps-core", "crates/ps-ipc", "crates/ps-service", "crates/ps-ctl"]
[workspace.package]
version = "0.1.0"
version = "0.1.0-pre.1"
edition = "2024"
license = "MIT"
repository = "https://git.faumaray.com/faumaray/proxy-suite-flake"
@@ -31,3 +31,8 @@ sha2 = "0.10"
zip = { version = "2", default-features = false, features = ["deflate"] }
ps-core = { path = "crates/ps-core" }
ps-ipc = { path = "crates/ps-ipc" }
[profile.release]
lto = "thin"
strip = true
codegen-units = 4
+150
View File
@@ -0,0 +1,150 @@
# Proxy Suite for Windows
A native Windows port of [proxy-suite-flake](https://github.com/FUFSoB/proxy-suite-flake): the
same configuration (upstream's `services.proxy-suite` options, same names and defaults), run
by a Windows service instead of NixOS and systemd, controlled with `proxy-ctl` as upstream's is.
> [!WARNING]
> **Pre-release.** Built and tested on Linux and under Wine, **never yet run on real Windows.**
> Read [what has been verified](#what-has-been-verified) before relying on it, and please
> report what happens on yours.
> [!IMPORTANT]
> For study and research only, as upstream: learning how proxies, tunnels and traffic
> routing work. No warranty.
## What it does (this release)
| | |
|---|---|
| Local proxy | SOCKS5/HTTP on `127.0.0.1:1080` through sing-box (or the hybrid sing-box + XRay backend) |
| Outbounds | links (vless/REALITY/TLS, vmess, trojan, shadowsocks, hysteria2, tuic, anytls, naive, socks, http), raw JSON, subscriptions, groups (failover, urltest, selector), chains, pins, route modes, routing rules by site, address, geodata, rule set or **program** |
| zapret | Flowseal's [zapret-discord-youtube](https://github.com/Flowseal/zapret-discord-youtube) release: `winws.exe` with any of its `general*.bat` presets, your lists, the game filter |
| zapret2 | `winws2.exe` from bol-van's [zapret-win-bundle](https://github.com/bol-van/zapret-win-bundle) with [nfqws2-keenetic](https://github.com/nfqws/nfqws2-keenetic)'s strategies and nfqws2's own learning of blocked sites |
| tg-ws-proxy | Flowseal's [tg-ws-proxy](https://github.com/Flowseal/tg-ws-proxy), the headless proxy, on a bundled Python |
| TUN | sing-box's TUN (wintun), `proxy-ctl proxy tun on` — **see the caveats** |
Not in this release, still to come: the desktop app (GPUI, with a tray icon), AmneziaWG,
WARP, Tor, the SSH tunnel, whitelist-bypass, the kill switch, server inbounds, the XRay-only
backend, zapret2's extended detection and z2k strategies.
## What has been verified
| Part | How |
|---|---|
| Share-link and subscription parsing | upstream's tests, ported; ~750 links through upstream's Python and this, identical results |
| sing-box and XRay configs | rendered for many setups and accepted by `sing-box check` and `xray run -test` |
| Service, API, `proxy-ctl` | end to end on Linux: a real sing-box Shadowsocks server, the service, `proxy-ctl` adding the outbound, a page fetched through the local proxy |
| Windows build: service, named pipe, its ACL, caller identification, component hashes, supervisor | under Wine (`tools/wine-e2e.sh`) |
| zapret arguments | **every** preset of the release, both game filters, checked by the release's own `winws.exe --dry-run` under Wine (`tools/winws-dry-run.sh`) |
| zapret2 arguments | checked by `winws2.exe --dry-run` under Wine |
| tg-ws-proxy | runs and listens under Wine |
**Not verified: anything that needs real Windows.** Traffic through sing-box on Windows (Wine
lacks an API it needs), the TUN adapter, WinDivert actually rewriting packets, the Windows
service under the Service Control Manager, `install`/`uninstall`, the system PATH change.
## Install
1. Unzip `ProxySuite-<version>-windows-x64.zip` anywhere.
2. Run `install.cmd` (it asks for administrator rights). It copies the program to
`C:\Program Files\ProxySuite`, registers the **ProxySuite** service (starts at boot), adds
`proxy-ctl` to PATH and starts it.
3. Open a **new** terminal: `proxy-ctl status`.
To upgrade, unzip the new release and run its `install.cmd`. To remove, run `uninstall.cmd`;
the configuration and state stay in `%ProgramData%\ProxySuite` until you delete it.
Windows Defender and other antivirus software may flag WinDivert (zapret's driver): it is a
packet-filtering driver, which is what it is for. Remove other DPI-bypass tools first:
Flowseal's own `zapret` service (its `service.bat` → Remove Services) or GoodbyeDPI — the
service refuses to start zapret while one runs, and says which.
## First run
```powershell
# A proxy:
proxy-ctl proxy outbounds add "vless://...#My Server"
proxy-ctl proxy on
proxy-ctl status
# Then point apps (or Windows: Settings → Network → Proxy) at 127.0.0.1:1080.
# Or a subscription:
proxy-ctl proxy subs add https://provider.example/sub/token
# zapret, Flowseal's presets:
proxy-ctl zapret on
proxy-ctl zapret preset "general (ALT9)"
proxy-ctl zapret game-filter all
# zapret2 instead:
proxy-ctl config get > config.json # set "zapret": { "enable": true, "engine": "zapret2" }
proxy-ctl config set config.json
# Telegram's WebSocket proxy:
proxy-ctl config get > config.json # set "tgWsProxy": { "enable": true }
proxy-ctl config set config.json
proxy-ctl logs proxy-suite-tg-ws-proxy # its tg:// link and secret
proxy-ctl logs -f # everything, following
proxy-ctl --help
```
## The configuration
`proxy-ctl config get` prints it, `proxy-ctl config set <file>` replaces it (checked first; a
bad one changes nothing), `proxy-ctl config validate <file>` only checks. It is upstream's
option tree as JSON, so [upstream's option reference](../docs/options/index.md) describes it:
`services.proxy-suite.proxy.listener.port` is `{"proxy": {"listener": {"port": …}}}`.
Options that only mean something on Linux (TProxy, fwmarks, routing tables, packages) are not
there; the Windows-only ones are documented in `crates/ps-core/src/config/`:
- `proxy.singBox.testPort`; `proxy.systemProxy` (applied by the desktop app, which is not in this release)
- `proxy.routing.rules.*.processNames` / `processPaths` (and `name`, `priority`, `disabled`)
- `perAppRouting.profiles.*`: programs held to an outbound, by name or path
- `zapret.tcpTimestamps`, `geodata` as download locations, `tor.controlPort`
- inline `config` text where upstream only takes a file (AmneziaWG, WARP)
## Who may change what
The service runs as LocalSystem. Its settings are meant to be edited by whoever uses the
machine, so — **unlike upstream, where changes need root** — `userControl` defaults to on
for the signed-in user, with every scope. On a shared computer, set
`userControl.scopes` (or turn `userControl.enable` off) as an administrator.
Whatever the scopes, these always need an administrator: anything that makes the service run
a program, pass arguments to one, or read or write a file of the caller's choosing — every
`*File` option, raw `singBoxJson`/`xrayJson`, `sshProxy.extraArgs`, `tor.extraConfig`,
`nfqwsArgs`, zapret2's `profiles` and `blobs`, `allowConfigHooks`, and `userControl` itself —
and installing components. Secrets (links, passwords) are hidden from callers without the
`secrets` scope, and survive a round trip through `config get`/`config set` unchanged.
## Caveats
- **TUN and zapret together**: upstream keeps zapret's packets off the TUN interface, which
this release does not do yet. Use one or the other.
- zapret2 learns with nfqws2's own detector, not upstream's extended one; z2k's strategies are
not there yet.
- The global TUN restarts the local proxy when it is turned on or off (one sing-box does both).
## Components
The release carries every program it runs, each pinned by version and hash
([`components.json`](components.json)), and the service checks each against the hashes
recorded at install before running it. `proxy-ctl components` lists them;
`proxy-ctl components install [name…]` fetches and verifies them again (administrator).
See [`THIRD-PARTY.md`](THIRD-PARTY.md) for their licenses and sources.
## Building
On Linux with Nix: `nix develop` here (this directory has its own `flake.nix`), then
```sh
cargo test --workspace # everything, sing-box and xray from the shell
python3 -I tools/parity/links.py # link parsing against upstream's Python
tools/package.sh # the release zip, in dist/
nix shell nixpkgs#wineWow64Packages.stable -c tools/winws-dry-run.sh dist/ProxySuite-*/components
```
The Windows programs are cross-compiled with `cargo xwin` (MSVC target). Design notes:
[`DESIGN.md`](DESIGN.md).
+5
View File
@@ -647,6 +647,11 @@ async fn proxy(ctl: &Ctl, verb: Option<ProxyVerb>) -> Result<()> {
println!("{}", if s["proxy"]["tun"] == true { "on" } else { "off" });
}
OnOff::On => {
ctl.edit(|c| {
c["proxy"]["tun"]["enable"] = true.into();
Ok(())
})
.await?;
ctl.call(Request::Start { unit: "proxy-suite-tun".into() }).await?;
}
OnOff::Off => {
+18 -6
View File
@@ -174,6 +174,17 @@ async fn connection(mut conn: Conn, shared: Shared) {
}
};
let peer = conn.peer();
// Every request, streamed or not, is authorized here before anything is done for it.
let denied = {
let s = shared.lock().await;
allowed(s.cfg(), &peer, scope_of(&req)).err()
};
if let Some(e) = denied {
if conn.write_json(&Response::err(e)).await.is_err() {
return;
}
continue;
}
if let Request::Logs { unit, lines, follow: true } = &req {
follow_logs(&mut conn, &shared, unit.clone(), *lines).await;
return;
@@ -208,13 +219,8 @@ async fn follow_logs(conn: &mut Conn, shared: &Shared, unit: Option<String>, lin
}
}
/// Does what `req` asks; the caller has authorized it (`connection`).
pub async fn handle(req: Request, peer: &Peer, shared: &Shared) -> Response {
{
let s = shared.lock().await;
if let Err(e) = allowed(s.cfg(), peer, scope_of(&req)) {
return Response::err(e);
}
}
match req {
Request::Status => Response::ok(shared.lock().await.status()),
@@ -525,6 +531,12 @@ mod tests {
assert_eq!(back.proxy.listener.auth.password.as_deref(), Some("pw"));
}
#[test]
fn following_logs_needs_the_secrets_scope_too() {
assert_eq!(scope_of(&Request::Logs { unit: None, lines: 10, follow: true }), Some(Scope::Secrets));
assert_eq!(scope_of(&Request::Logs { unit: None, lines: 10, follow: false }), Some(Scope::Secrets));
}
#[test]
fn scopes_follow_user_control() {
let mut cfg = Config::default();
+16 -1
View File
@@ -71,8 +71,23 @@ impl Paths {
/// lets anyone else in is moved aside, never adopted: ProgramData lets any user make
/// folders, and the service runs what is under `bin\` as SYSTEM.
pub fn create_all(&self) -> std::io::Result<()> {
// Once per process: a second check of a root this process made (and may be writing
// its log into) has nothing to learn, and moving it aside then would lose the log.
static CHECKED: std::sync::Mutex<Vec<PathBuf>> = std::sync::Mutex::new(Vec::new());
let first = {
let mut checked = CHECKED.lock().unwrap();
let first = !checked.contains(&self.root);
if first {
checked.push(self.root.clone());
}
first
};
#[cfg(windows)]
secure::ensure_root(&self.root)?;
if first {
secure::ensure_root(&self.root)?;
}
#[cfg(not(windows))]
let _ = first;
#[cfg(not(windows))]
std::fs::create_dir_all(&self.root)?;
for dir in [self.subscriptions(), self.rule_sets(), self.cache(), self.run(), self.logs(), self.bin()] {
+21 -6
View File
@@ -25,7 +25,7 @@ pub fn install_dir() -> PathBuf {
}
/// The files of a release that `install` copies.
const RELEASE_FILES: [&str; 5] = ["proxy-suite-service.exe", "proxy-ctl.exe", "README.md", "THIRD-PARTY.md", "LICENSE"];
const RELEASE_FILES: [&str; 7] = ["proxy-suite-service.exe", "proxy-ctl.exe", "README.md", "THIRD-PARTY.md", "LICENSE", "install.cmd", "uninstall.cmd"];
fn copy_release(from: &Path, to: &Path) -> Result<()> {
std::fs::create_dir_all(to)?;
@@ -124,8 +124,16 @@ pub fn install() -> Result<()> {
if let Err(e) = path::add(&to) {
println!("warning: could not add {} to PATH: {e:#}", to.display());
}
service.start::<&str>(&[]).context("starting the service")?;
println!("{DISPLAY} is installed in {} and started.", to.display());
// A moment for the manager to settle the change just made (Wine's otherwise answers
// ERROR_SERVICE_DATABASE_LOCKED); a start that still fails leaves a working install.
std::thread::sleep(Duration::from_secs(1));
match service.start::<&str>(&[]) {
Ok(()) => println!("{DISPLAY} is installed in {} and started.", to.display()),
Err(e) => {
println!("{DISPLAY} is installed in {}, but did not start: {e}", to.display());
println!("Start it with: sc start {NAME} (its log: %ProgramData%\\ProxySuite\\logs\\service.log)");
}
}
println!("Open a new terminal and try: proxy-ctl status");
Ok(())
}
@@ -148,10 +156,17 @@ pub fn uninstall() -> Result<()> {
let dir = install_dir();
let _ = path::remove(&dir);
if dir.exists() {
// This program may be one of the files: they go a moment after it exits.
// This program may be one of the files: they go a moment after it exits. Raw, as cmd
// does its own quote parsing; from outside the folder, which a working directory holds.
use std::os::windows::process::CommandExt;
const CREATE_NO_WINDOW: u32 = 0x0800_0000;
let _ = std::process::Command::new("cmd")
.args(["/c", "ping -n 3 127.0.0.1 >nul & rmdir /s /q"])
.arg(&dir)
.raw_arg(format!("/c ping -n 3 127.0.0.1 >nul & rmdir /s /q \"{}\"", dir.display()))
.current_dir(std::env::var_os("SystemRoot").unwrap_or_else(|| "C:\\Windows".into()))
.creation_flags(CREATE_NO_WINDOW)
.stdin(std::process::Stdio::null())
.stdout(std::process::Stdio::null())
.stderr(std::process::Stdio::null())
.spawn();
println!("Removing {}.", dir.display());
}
+5
View File
@@ -47,6 +47,11 @@
xray
python3
jq
zip
unzip
curl
git
python3Packages.pip
];
buildInputs = guiLibs;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath guiLibs;
+2 -2
View File
@@ -5,8 +5,8 @@
#
# tools/build-tg-ws-proxy.sh OUT_DIR (needs curl, git, unzip, pip)
set -euo pipefail
OUT=$(realpath -m "${1:?output directory}")
cd "$(dirname "$0")"
OUT=${1:?output directory}
PY_VERSION=3.12.10
PY_URL=https://www.python.org/ftp/python/$PY_VERSION/python-$PY_VERSION-embed-amd64.zip
PY_SHA256=4acbed6dd1c744b0376e3b1cf57ce906f9dc9e95e68824584c8099a63025a3c3
@@ -25,7 +25,7 @@ pip download -q --require-hashes --no-deps --only-binary=:all: --platform win_am
mkdir -p "$OUT/python/Lib/site-packages"
for w in "$WORK"/wheels/*.whl; do unzip -q -o "$w" -d "$OUT/python/Lib/site-packages"; done
git clone -q --depth 1 --branch "$TG_TAG" https://github.com/Flowseal/tg-ws-proxy "$WORK/src"
git -c advice.detachedHead=false clone -q --depth 1 --branch "$TG_TAG" https://github.com/Flowseal/tg-ws-proxy "$WORK/src"
[ "$(git -C "$WORK/src" rev-parse HEAD)" = "$TG_COMMIT" ] || { echo "tag $TG_TAG moved off $TG_COMMIT"; exit 1; }
cp -r "$WORK/src/proxy" "$WORK/src/utils" "$WORK/src/LICENSE" "$OUT/app/"
+9
View File
@@ -0,0 +1,9 @@
@echo off
:: Proxy Suite: install, or upgrade, as an administrator. Copies the program into
:: %ProgramFiles%\ProxySuite, registers the service there and starts it.
net session >nul 2>&1 || (
powershell -NoProfile -Command "Start-Process -Verb RunAs -FilePath '%~f0'"
exit /b
)
"%~dp0proxy-suite-service.exe" install
pause
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
# The release: ProxySuite-<version>-windows-x64.zip in dist/, with the programs, every
# component (fetched and verified), the install scripts, the README and the licenses.
#
# nix develop --command tools/package.sh (needs curl, git, unzip, zip, pip)
set -euo pipefail
cd "$(dirname "$0")/.."
VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)
NAME=ProxySuite-$VERSION-windows-x64
DIST=dist/$NAME
CACHE=${CACHE:-${XDG_CACHE_HOME:-$HOME/.cache}/proxy-suite-windows}
rm -rf "$DIST" "dist/$NAME.zip"
mkdir -p "$DIST/components"
echo "== components"
tools/build-tg-ws-proxy.sh "$DIST/components/tg-ws-proxy"
cargo build -q --release -p ps-service
target/release/proxy-suite-service stage-components --to "$DIST/components" --cache "$CACHE"
rm -rf "$DIST"/components/*.old "$DIST"/components/*.staging
echo "== programs"
cargo xwin build -q --release -p ps-service -p ps-ctl --target x86_64-pc-windows-msvc
cp target/x86_64-pc-windows-msvc/release/proxy-suite-service.exe target/x86_64-pc-windows-msvc/release/proxy-ctl.exe "$DIST/"
cp ../LICENSE README.md "$DIST/"
cp tools/install.cmd tools/uninstall.cmd "$DIST/"
echo "== THIRD-PARTY.md"
{
echo "# Third-party components"
echo
echo "Proxy Suite for Windows ($VERSION) is MIT-licensed (LICENSE). It carries, unchanged, the"
echo "programs below, each from its project's own release, pinned by version and hash in"
echo "components.json. Their licenses are theirs; where a license asks for its source, it is at"
echo "the address given."
echo
echo "| Component | Version | License | Source |"
echo "|---|---|---|---|"
jq -r '.components | to_entries[] | "| \(.key) | \(.value.version) | \(.value.license) | \(.value.homepage) |"' components.json
echo
echo "Inside them:"
echo
echo "- **WinDivert** (zapret, zapret2): LGPL-3.0 or GPL-2.0, https://github.com/basil00/WinDivert"
echo "- **cygwin1.dll** (zapret, zapret2): LGPL-3.0, https://cygwin.com"
echo "- **zapret2** (winws2.exe, its Lua) and **nfqws2-keenetic** (its strategies, lists, blobs): MIT, https://github.com/bol-van/zapret2, https://github.com/nfqws/nfqws2-keenetic"
echo "- **wintun** (inside sing-box): WireGuard's prebuilt-binary license, https://www.wintun.net"
echo "- **CPython $( sed 's/.*+py//' "$DIST/components/tg-ws-proxy/.version" )** (tg-ws-proxy): PSF License, https://www.python.org"
echo "- **Python packages** (tg-ws-proxy):"
sed -n 's/^\([A-Za-z0-9_.-]*\)==\([^ ]*\) .*/ - \1 \2, https:\/\/pypi.org\/project\/\1\/\2\//p' tools/tg-ws-proxy-requirements.txt
echo
echo "License files that came with them:"
echo
(cd "$DIST" && find components -iname 'LICENSE*' -o -iname 'COPYING*' | sort | sed 's/^/- /')
} > "$DIST/THIRD-PARTY.md"
echo "== zip"
(cd dist && zip -qr "$NAME.zip" "$NAME")
(cd dist && sha256sum "$NAME.zip" | tee "$NAME.zip.sha256")
du -h "dist/$NAME.zip"
+9
View File
@@ -0,0 +1,9 @@
@echo off
:: Proxy Suite: remove the service and the program. The configuration and state stay in
:: %ProgramData%\ProxySuite.
net session >nul 2>&1 || (
powershell -NoProfile -Command "Start-Process -Verb RunAs -FilePath '%~f0'"
exit /b
)
:: One line: cmd reads a batch file line by line, and this one is deleted meanwhile.
"%~dp0proxy-suite-service.exe" uninstall & pause & exit /b
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# The release's install and uninstall, under Wine's Service Control Manager: copied into
# Program Files, registered, started, reachable over its pipe, removed.
#
# nix shell nixpkgs#wineWow64Packages.stable -c tools/wine-install-test.sh dist/ProxySuite-<version>-windows-x64
set -euo pipefail
REL=$(realpath "${1:?the unpacked release directory}")
WORK=$(mktemp -d)
export WINEPREFIX=${WINEPREFIX:-$WORK/prefix} WINEDEBUG=-all
trap 'wineserver -k 2>/dev/null || true; rm -rf "$WORK"' EXIT
wineboot -i >/dev/null 2>&1 || true
for key in Tcpip Tcpip6; do
wine reg add "HKLM\\SYSTEM\\CurrentControlSet\\Services\\$key\\Parameters\\Interfaces" /f >/dev/null 2>&1
done
cd "$REL"
echo "== install"
wine ./proxy-suite-service.exe install
PF="$WINEPREFIX/drive_c/Program Files/ProxySuite"
ls "$PF" | sed 's/^/ /'
# Wine's manager often fails the first start right after a create (real Windows does not),
# holding the service in a start that times out after ~50 s: install says so; once that is
# over, a second start works.
for _ in $(seq 40); do
st=$(wine sc query ProxySuite 2>/dev/null || true)
st=${st//$'\r'/}
echo " $(grep STATE <<<"$st" | grep -o '[A-Z_]*$' || true)"
grep -q RUNNING <<<"$st" && break
grep -q STOPPED <<<"$st" && { wine sc start ProxySuite >/dev/null 2>&1 || true; }
sleep 3
done
echo "== status over the pipe"
for _ in $(seq 30); do wine "$PF/proxy-ctl.exe" status 2>/dev/null && break; sleep 1; done
wine "$PF/proxy-ctl.exe" components || {
echo "== service log"; tail -30 "$WINEPREFIX/drive_c/ProgramData/ProxySuite/logs/service.log"; exit 1; }
echo "== uninstall"
wine "$PF/proxy-suite-service.exe" uninstall
sleep 5
[ ! -e "$PF/proxy-suite-service.exe" ] && echo "program files removed" || echo "program files still there"