Skip to content

Real-time network monitor + outbound firewall — see & block every connection. Privacy-first, local-first, Rust fleet agent, SIEM exports, 8 languages. / Moniteur réseau temps réel + pare-feu sortant, agent de flotte Rust, exports SIEM. 100 % local.

feat(windows): one-click installers — Electron NSIS in CI + Inno Lite fallback, --launcher backend mode

MoneyLisaa1bd7e003feb
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6cf7b91..844ee33 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -82,6 +82,57 @@ jobs:
run: pip install -r backend/requirements.txt pyinstaller
- name: PyInstaller build (onedir)
run: cd backend && pyinstaller backend.spec --distpath ../dist/backend
+ # EN: Stage the compiled UI inside the bundle so the standalone backend
+ # actually serves it — api/main.py mounts <bundle>/frontend_dist.
+ # Without this the backend tarball opens to a bare API.
+ # FR: Mettre l'UI compilée dans le bundle pour que le backend autonome
+ # la serve — api/main.py monte <bundle>/frontend_dist. Sans ça le
+ # tarball backend n'ouvre qu'une API nue.
+ - name: Stage frontend_dist into bundle
+ shell: bash
+ run: |
+ mkdir -p dist/backend/snitch-backend/frontend_dist
+ cp -r frontend/dist/. dist/backend/snitch-backend/frontend_dist/
+ # EN: One-click Windows installer — Inno Setup on the runner. Npcap is
+ # NOT bundled (free license forbids it); the .iss script detects it
+ # and points the user at the official download page.
+ # FR: Installeur Windows en un clic — Inno Setup sur le runner. Npcap
+ # n'est PAS embarqué (la licence gratuite l'interdit) ; le script
+ # .iss le détecte et renvoie vers la page officielle.
+ # EN: Flagship Windows installer — Electron + NSIS, already fully wired
+ # in electron/main.js (Npcap check, UAC spawn, tray, token via IPC).
+ # Unsigned build: CSC_IDENTITY_AUTO_DISCOVERY=false skips code
+ # signing when no certificate secret is configured.
+ # FR: Installeur Windows principal — Electron + NSIS, déjà entièrement
+ # câblé dans electron/main.js (détection Npcap, spawn UAC, tray,
+ # jeton via IPC). Build non signé : CSC_IDENTITY_AUTO_DISCOVERY=false
+ # saute la signature quand aucun certificat n'est configuré.
+ - name: Build Electron installer (Windows NSIS)
+ if: matrix.os == 'windows-latest'
+ shell: pwsh
+ env:
+ CSC_IDENTITY_AUTO_DISCOVERY: 'false'
+ run: |
+ cd electron
+ npm ci
+ npm run build
+ # EN: Lightweight backend-only installer — Inno Setup, opens the UI in
+ # the browser via --launcher. Fallback path if Electron breaks.
+ # FR: Installeur léger backend seul — Inno Setup, ouvre l'UI dans le
+ # navigateur via --launcher. Chemin de secours si Electron casse.
+ - name: Build Windows installer (Inno Setup)
+ if: matrix.os == 'windows-latest'
+ shell: pwsh
+ run: |
+ choco install innosetup --no-progress -y
+ $v = "${{ github.ref_name }}" -replace '^v',''
+ & "C:\Program Files (x86)\Inno Setup 6\iscc.exe" "/DMyAppVersion=$v" "installer\snitch.iss"
+ - name: Upload Windows installer artifacts
+ if: matrix.os == 'windows-latest'
+ uses: actions/upload-artifact@v7
+ with:
+ name: snitch-setup-windows
+ path: dist/installer/*.exe
- name: SHA256 checksums
shell: bash
run: |
diff --git a/README.md b/README.md
index 1dba7fc..018a6be 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ The entire interface is available in **English and French**: use the `EN / FR` t
|---|---|
| **macOS (Apple Silicon)** | `brew install --cask aixisstudio/tap/snitch` — or [Snitch-1.0.5-macos-arm64.zip](https://github.com/aixisstudio/Snitch/releases/download/v1.0.5/Snitch-1.0.5-macos-arm64.zip) |
| **Linux** | `sudo docker compose up --build` — see [Docker (Linux)](#docker-linux) |
-| **Windows** | [snitch-backend-windows-latest.tar.gz](https://github.com/aixisstudio/Snitch/releases/latest) (backend, requires [Npcap](https://npcap.com/)) — or build from source, see [Build the installer](#build-the-installer) |
+| **Windows** | **Snitch Setup** `.exe` — one-click NSIS installer (native app, UAC prompt at launch, Npcap check built in — from v1.0.6). Lite alternative: `Snitch-Lite-Setup` (backend + browser UI, Inno Setup). Both build in CI on tags — see [Build the installer](#build-the-installer). Requires [Npcap](https://npcap.com/) |
| **All (1-click)** | [Pinokio](https://pinokio.co/apps/github-com-aixisstudio-snitch) — installs deps, runs the backend, opens the UI / installe tout, lance le backend, ouvre l'UI |
Or grab the latest release: **[github.com/aixisstudio/Snitch/releases](https://github.com/aixisstudio/Snitch/releases)**
@@ -193,8 +193,14 @@ cd ../electron
npm ci
npm run build # NSIS installer -> dist/installer/Snitch Setup <version>.exe
# npm run build:dir # unpacked app only -> dist/installer/win-unpacked/
+
+# 4 — Optional: lightweight Inno Setup installer (backend + browser UI)
+iscc /DMyAppVersion=<version> ../installer/snitch.iss
+# -> dist/installer/Snitch-Lite-Setup-<version>-windows-x64.exe
```
+Both Windows installers are produced by CI on every tag (`.github/workflows/ci.yml` → `package` job, `windows-latest`).
+
### Project structure
```
@@ -246,7 +252,7 @@ Toute l'interface est disponible en **français et en anglais** : utilisez le s
|---|---|
| **macOS (Apple Silicon)** | `brew install --cask aixisstudio/tap/snitch` — ou [Snitch-1.0.5-macos-arm64.zip](https://github.com/aixisstudio/Snitch/releases/download/v1.0.5/Snitch-1.0.5-macos-arm64.zip) |
| **Linux** | `sudo docker compose up --build` — voir [Docker (Linux)](#docker-linux-1) |
-| **Windows** | [snitch-backend-windows-latest.tar.gz](https://github.com/aixisstudio/Snitch/releases/latest) (backend, nécessite [Npcap](https://npcap.com/)) — ou build depuis les sources, voir [Développement](#développement) |
+| **Windows** | **Snitch Setup** `.exe` — installeur NSIS en un clic (app native, prompt UAC au lancement, détection Npcap intégrée — à partir de la v1.0.6). Alternative lite : `Snitch-Lite-Setup` (backend + UI navigateur, Inno Setup). Les deux sont construits en CI aux tags — voir [Construire l'installeur](#build-the-installer). Nécessite [Npcap](https://npcap.com/) |
Ou récupérez la dernière release : **[github.com/aixisstudio/Snitch/releases](https://github.com/aixisstudio/Snitch/releases)**
diff --git a/ROADMAP.md b/ROADMAP.md
index e0753d5..fdec730 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -18,6 +18,7 @@ Also live / également en place : Docker image on GHCR, Homebrew tap (`brew inst
- [ ] **Signed & notarized macOS build** — needs an Apple Developer account ($99/yr). Until then the [tap](https://github.com/aixisstudio/homebrew-tap) strips quarantine for you / build macOS signée et notarisée — nécessite un compte Apple Developer. En attendant, le tap retire la quarantaine automatiquement
- [ ] **Homebrew upstream** (`brew install --cask snitch`) — blocked: the `snitch` formula name is already taken by an unrelated project; revisit once we have Developer ID signing / bloqué : le nom `snitch` est déjà pris par un autre projet ; à revoir une fois la signature en place
- [ ] **winget publishing** — [PR #455520](https://github.com/microsoft/winget-pkgs/pull/455520) open, awaiting Microsoft review / en attente de validation Microsoft
+- [ ] **Windows 1-click installers** — Electron NSIS (`Snitch Setup.exe`, native app + tray) and Inno Lite (`Snitch-Lite-Setup.exe`, backend + browser UI) now build in CI on tags; first shipping release v1.0.6 / installeurs Windows en un clic — NSIS Electron + Inno Lite, construits en CI aux tags ; première release v1.0.6
- [ ] **Linux packages** — .deb / .rpm / AppImage alongside Docker / paquets Linux en plus de Docker
- [ ] **Export formats** — per-host/session CSV & PCAP slices / exports CSV et PCAP par hôte ou session
- [ ] **Deeper tracker coverage** — community-editable lists live in `backend/classifier/lists/` / couverture trackers élargie — listes éditables par la communauté
diff --git a/backend/run_backend.py b/backend/run_backend.py
index f29f994..b01d999 100644
--- a/backend/run_backend.py
+++ b/backend/run_backend.py
@@ -71,6 +71,32 @@ if __name__ == '__main__':
elif a == '--bind' and i + 1 < len(args):
argv_bind = args[i + 1]
+ # EN: --launcher = installed-app entry point (Inno Setup shortcut):
+ # pick a free loopback port, compute the API token, open the browser
+ # once the server is up, then serve. This build has no console
+ # (console=False) so the browser IS the whole interface — the user
+ # double-clicks the shortcut, gets one UAC prompt, and the UI opens.
+ # FR: --launcher = point d'entrée de l'app installée (raccourci Inno) :
+ # port loopback libre, jeton API, ouverture du navigateur une fois le
+ # serveur prêt, puis service. Ce build n'a pas de console
+ # (console=False) donc le navigateur EST toute l'interface —
+ # l'utilisateur double-clique le raccourci, a un prompt UAC, et l'UI
+ # s'ouvre.
+ if '--launcher' in args:
+ import socket
+ import threading
+ import webbrowser
+
+ with socket.socket() as s:
+ s.bind(('127.0.0.1', 0))
+ port = s.getsockname()[1]
+
+ from api.security import get_token
+ url = f'http://127.0.0.1:{port}/?token={get_token()}'
+ threading.Timer(1.0, lambda: webbrowser.open(url)).start()
+ uvicorn.run(app, host='127.0.0.1', port=port, log_level='warning')
+ raise SystemExit(0)
+
# EN: Loopback-only by default everywhere — Electron AND Docker/dev.
# Set SNITCH_BIND=0.0.0.0 to expose (token auth still applies).
# FR: Loopback uniquement par défaut partout — Electron ET Docker/dev.
diff --git a/installer/snitch.iss b/installer/snitch.iss
new file mode 100644
index 0000000..8c240ee
--- /dev/null
+++ b/installer/snitch.iss
@@ -0,0 +1,160 @@
+; snitch.iss — Inno Setup script for the lightweight Windows installer.
+;
+; EN: Produces Snitch-Lite-Setup-<version>-windows-x64.exe — the backend-only
+; one-click install (no Electron runtime; the UI opens in the browser).
+; The flagship installer is the Electron NSIS build (`Snitch Setup
+; <version>.exe` from electron/); this Lite variant exists for minimal
+; footprints and as a fallback path:
+; 1. copies the PyInstaller ONEDIR bundle (backend + frontend_dist) to
+; Program Files\Snitch,
+; 2. creates Start Menu / optional Desktop shortcuts that self-elevate
+; through PowerShell (Start-Process -Verb RunAs) — the exe keeps a
+; plain manifest so Electron can still spawn it later,
+; 3. warns when Npcap is missing and offers the official download page.
+; Npcap is NOT bundled: the free Npcap license forbids external
+; redistribution (silent install requires the paid OEM license).
+;
+; Build (CI): iscc /DMyAppVersion=<tag> installer\snitch.iss
+; expects: ..\dist\backend\snitch-backend\ (PyInstaller ONEDIR output,
+; with frontend_dist staged inside it — see ci.yml)
+;
+; FR: Produit Snitch-Setup-<version>-windows-x64.exe — l'installation en un
+; clic :
+; 1. copie le bundle PyInstaller ONEDIR (backend + frontend_dist) dans
+; Program Files\Snitch,
+; 2. crée les raccourcis Menu Démarrer / Bureau qui s'élèvent via
+; PowerShell (Start-Process -Verb RunAs) — l'exe garde un manifeste
+; normal pour qu'Electron puisse toujours le lancer plus tard,
+; 3. avertit si Npcap manque et propose la page officielle de
+; téléchargement. Npcap n'est PAS embarqué : sa licence gratuite
+; interdit la redistribution (l'installation silencieuse exige la
+; licence OEM payante).
+;
+; Build (CI) : iscc /DMyAppVersion=<tag> installer\snitch.iss
+; attendu : ..\dist\backend\snitch-backend\ (sortie PyInstaller ONEDIR,
+; avec frontend_dist dedans — voir ci.yml)
+
+#ifndef MyAppVersion
+ #define MyAppVersion "0.0.0-dev"
+#endif
+#ifndef SourceDir
+ #define SourceDir ".."
+#endif
+
+[Setup]
+; EN: fixed upgrade GUID — do not change between releases or upgrades break.
+; FR: GUID d'upgrade fixe — ne jamais changer entre releases sinon les
+; mises à jour cassent.
+AppId={{7D3F9C1E-5B2A-4E8F-9C3D-1A6B8E4F2D07}
+AppName=Snitch
+AppVersion={#MyAppVersion}
+AppVerName=Snitch {#MyAppVersion}
+AppPublisher=aiXis Studio
+AppPublisherURL=https://github.com/aixisstudio/Snitch
+AppSupportURL=https://github.com/aixisstudio/Snitch/issues
+AppUpdatesURL=https://github.com/aixisstudio/Snitch/releases
+DefaultDirName={autopf}\Snitch
+DefaultGroupName=Snitch
+OutputDir={#SourceDir}\dist\installer
+OutputBaseFilename=Snitch-Lite-Setup-{#MyAppVersion}-windows-x64
+Compression=lzma2
+SolidCompression=yes
+; EN: admin required — payload lands in Program Files, and live capture
+; needs it anyway. / FR: admin requis — le payload va dans Program Files,
+; et la capture en a besoin de toute façon.
+PrivilegesRequired=admin
+WizardStyle=modern
+UninstallDisplayIcon={app}\snitch-backend\snitch-backend.exe
+ArchitecturesAllowed=x64compatible
+ArchitecturesInstallIn64BitMode=x64compatible
+; EN: keep data on uninstall — captures live in %LOCALAPPDATA%\Snitch, not in
+; the install dir. / FR: garder les données à la désinstallation — les
+; captures vivent dans %LOCALAPPDATA%\Snitch, pas dans le dossier
+; d'installation.
+UninstallDisplayName=Snitch
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+Name: "french"; MessagesFile: "compiler:Languages\French.isl"
+
+[Tasks]
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; \
+ GroupDescription: "{cm:AdditionalIcons}"
+
+[Files]
+; EN: whole ONEDIR bundle — exe + _internal + frontend_dist (staged by CI).
+; FR: bundle ONEDIR complet — exe + _internal + frontend_dist (mis en place
+; par la CI).
+Source: "{#SourceDir}\dist\backend\snitch-backend\*"; \
+ DestDir: "{app}\snitch-backend"; \
+ Flags: recursesubdirs createallsubdirs ignoreversion
+Source: "{#SourceDir}\LICENSE"; DestDir: "{app}"; Flags: ignoreversion
+
+[Icons]
+; EN: the shortcut does NOT point at snitch-backend.exe directly — it runs a
+; hidden PowerShell wrapper that elevates via Start-Process -Verb RunAs.
+; That keeps the exe manifest plain (uac_admin=False) so a future
+; Electron wrapper can still spawn it unelevated.
+; FR: le raccourci ne pointe PAS sur snitch-backend.exe directement — il
+; lance un wrapper PowerShell caché qui s'élève via Start-Process
+; -Verb RunAs. Le manifeste de l'exe reste normal (uac_admin=False) pour
+; qu'un futur conteneur Electron puisse toujours le lancer sans élévation.
+Name: "{group}\Snitch"; \
+ Filename: "{sys}\WindowsPowerShell\v1.0\powershell.exe"; \
+ Parameters: "-NoProfile -WindowStyle Hidden -Command ""Start-Process '{app}\snitch-backend\snitch-backend.exe' -Verb RunAs -ArgumentList '--launcher'"""; \
+ WorkingDir: "{app}"; \
+ IconFilename: "{app}\snitch-backend\snitch-backend.exe"; \
+ Comment: "Snitch — see every connection your computer makes"
+Name: "{autodesktop}\Snitch"; \
+ Filename: "{sys}\WindowsPowerShell\v1.0\powershell.exe"; \
+ Parameters: "-NoProfile -WindowStyle Hidden -Command ""Start-Process '{app}\snitch-backend\snitch-backend.exe' -Verb RunAs -ArgumentList '--launcher'"""; \
+ WorkingDir: "{app}"; \
+ IconFilename: "{app}\snitch-backend\snitch-backend.exe"; \
+ Tasks: desktopicon
+
+[Run]
+; EN: "Launch Snitch" checkbox on the finish page — same elevated wrapper.
+; FR: case « Lancer Snitch » sur la page de fin — même wrapper élevé.
+Filename: "{sys}\WindowsPowerShell\v1.0\powershell.exe"; \
+ Parameters: "-NoProfile -WindowStyle Hidden -Command ""Start-Process '{app}\snitch-backend\snitch-backend.exe' -Verb RunAs -ArgumentList '--launcher'"""; \
+ WorkingDir: "{app}"; \
+ Description: "{cm:LaunchProgram,Snitch}"; \
+ Flags: postinstall nowait
+
+[CustomMessages]
+english.NpcapMissing=Npcap was not detected on this machine.%n%nSnitch needs Npcap to capture live traffic (like Wireshark does). Without it, the app will open but show no packets.%n%nOpen npcap.com to download it now? You can also install it later.
+french.NpcapMissing=Npcap n'a pas été détecté sur cette machine.%n%nSnitch a besoin de Npcap pour capturer le trafic en direct (comme Wireshark). Sans lui, l'app s'ouvre mais n'affiche aucun paquet.%n%nOuvrir npcap.com pour le télécharger maintenant ? Vous pouvez aussi l'installer plus tard.
+
+[Code]
+{ EN: Npcap presence check — its service key plus the wpcap.dll it drops
+ under System32\Npcap. Either one means a working install.
+ FR: détection de Npcap — sa clé de service plus le wpcap.dll déposé dans
+ System32\Npcap. L'un des deux suffit à signaler une installation. }
+function IsNpcapInstalled(): Boolean;
+begin
+ Result := RegKeyExists(HKLM, 'SYSTEM\CurrentControlSet\Services\npcap')
+ or FileExists(ExpandConstant('{sys}\Npcap\wpcap.dll'));
+end;
+
+{ EN: after files are installed, warn once if Npcap is missing and offer the
+ official download page. Non-blocking on purpose: the install stays
+ valid, capture just won't run until Npcap lands.
+ FR: une fois les fichiers installés, avertir une fois si Npcap manque et
+ proposer la page officielle. Volontairement non bloquant : l'install
+ reste valide, la capture ne démarrera juste pas tant que Npcap n'est
+ pas là. }
+procedure CurStepChanged(CurStep: TSetupStep);
+var
+ Answer: Integer;
+ ErrorCode: Integer;
+begin
+ if CurStep = ssPostInstall then
+ if not IsNpcapInstalled() then
+ begin
+ Answer := MsgBox(CustomMessage('NpcapMissing'),
+ mbConfirmation, MB_YESNO);
+ if Answer = IDYES then
+ ShellExec('open', 'https://npcap.com/#download', '', '',
+ SW_SHOW, ewNoWait, ErrorCode);
+ end;
+end;