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.
Python cybersecurityd3jsebpfedrelectronfastapifirewallfleet-managementlinuxlittle-snitch-alternativemacosnetwork-monitornetwork-securitypacket-captureprivacyreactrustself-hostedsiemwindows
Fix blank map: bundle TopoJSON + geolocation timeout
MoneyLisa3ecc1413062e
diff --git a/electron/package.json b/electron/package.jsonindex 68d2220..4348c57 100644--- a/electron/package.json+++ b/electron/package.json@@ -1,6 +1,6 @@{"name": "snitch",- "version": "1.0.3",+ "version": "1.0.4","description": "Snitch — real-time network traffic visualizer / visualiseur de trafic réseau en temps réel","main": "main.js","license": "AGPL-3.0-or-later",diff --git a/frontend/package.json b/frontend/package.jsonindex 45fad91..07e4f40 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -1,6 +1,6 @@{"name": "snitch-frontend",- "version": "1.0.3",+ "version": "1.0.4","private": true,"license": "AGPL-3.0-or-later","description": "Snitch UI — React + D3.js / Interface React + D3.js",diff --git a/frontend/src/map/MapView.jsx b/frontend/src/map/MapView.jsxindex 7c96eb7..796b43d 100644--- a/frontend/src/map/MapView.jsx+++ b/frontend/src/map/MapView.jsx@@ -25,6 +25,13 @@ import { useEffect, useRef, useState } from 'react'import * as d3 from 'd3'import * as topojson from 'topojson-client'import { useT } from '../i18n'+// EN: The world map is bundled, not fetched — fetch() of a local file is+// blocked for file:// pages in Electron (opaque origin), so the map+// stayed blank in the packaged app.+// FR: La carte du monde est embarquée dans le bundle, pas fetchée —+// fetch() d'un fichier local est bloqué pour les pages file:// sous+// Electron (origine opaque), donc la carte restait vide dans l'app.+import worldTopoJson from './countries-110m.json'const STYLE = `@keyframes arcFlow {@@ -122,15 +129,23 @@ export default function MapView({ nodes, onNodeClick }) {// EN: Load the world TopoJSON + resolve the user's position once.// FR: Charger le TopoJSON du monde + résoudre la position utilisateur une fois.useEffect(() => {- const worldUrl = window.location.protocol === 'file:'- ? new URL('countries-110m.json', window.location.href).href- : '/countries-110m.json'- fetch(worldUrl).then(r => r.json()).then(setWorldTopo)+ // EN: Bundled import — no network, works identically under file://+ // (Electron) and http(s) (browser/Docker).+ // FR: Import embarqué — aucun réseau, fonctionne pareil sous file://+ // (Electron) et http(s) (navigateur/Docker).+ setWorldTopo(worldTopoJson)navigator.geolocation?.getCurrentPosition(p => setUserPos([p.coords.longitude, p.coords.latitude]),- () => setUserPos([2.35, 48.85]) // EN: Paris fallback / FR: repli sur Paris+ () => setUserPos([2.35, 48.85]), // EN: Paris fallback / FR: repli sur Paris+ { timeout: 4000, maximumAge: 3600000 })- if (!navigator.geolocation) setUserPos([2.35, 48.85])+ // EN: Electron has no location provider — getCurrentPosition can hang+ // forever without ever calling back, leaving userPos null and the+ // map blank. Belt-and-braces: force the fallback after 5 s either way.+ // FR: Electron n'a pas de fournisseur de localisation — getCurrentPosition+ // peut rester muet indéfiniment sans jamais rappeler, laissant userPos+ // null et la carte vide. Double sécurité : forcer le repli après 5 s.+ setTimeout(() => setUserPos(pos => pos ?? [2.35, 48.85]), 5000)}, [])useEffect(() => {diff --git a/frontend/public/countries-110m.json b/frontend/src/map/countries-110m.jsonsimilarity index 100%rename from frontend/public/countries-110m.jsonrename to frontend/src/map/countries-110m.json