How isaaclins/freesnitch works
FreeSnitch is a macOS outbound application firewall with a monitoring and rules interface. Users inspect connections, manage rules or profiles, and respond to connection alerts; the helper applies policy, while the Network System Extension provides per-process filtering in the firewall build. The helper also supports DNS filtering, pf enforcement, blocklists, and Insights. The graph combines sampled calls and imports with README-documented capabilities; unsampled feature links are documented rather than inferred from names.
Main entry points: HelperService.swift Privileged helper · AppState.swift App state and navigation · FilterDataProvider.swift Per-process filter · DNSProxy.swift DNS proxy
Components 23
Desktop app
- App state and navigation
Sources/GUI/ViewModels/AppState.swift - Rules and blocklists UI
Sources/GUI/Views/RulesManager.swift - Profiles UI
Sources/GUI/Views/ProfilesSettings.swift - Connection monitor
Sources/GUI/Views/NetworkMonitor.swift - Insights and map
Sources/GUI/Views/InsightsView.swift - Window and alerts
Sources/GUI/App/WindowManager.swift - Extension lifecycle
Sources/GUI/App/SystemExtensionManager.swift
Policy and storage
- Privileged helper
Sources/Helper/HelperService.swift - Rule and policy store
Sources/Shared/RuleStore.swift - Rule matcher
Sources/Shared/RuleMatcher.swift - Blocklist manager
Sources/Helper/BlocklistManager.swift - Network monitor service
Sources/Helper/NetMonitor.swift - Insights storage
Sources/Helper/InsightsStore.swift
Traffic enforcement
- DNS proxy
Sources/Helper/DNSProxy.swift - pf enforcement
Sources/Helper/PFManager.swift - Per-process filter
Sources/NetExt/FilterDataProvider.swift
Shared interfaces
- Policy snapshot bridge
Sources/Shared/SharedRuleBridge.swift - XPC connection
Sources/Shared/IPCConnection.swift - Profile client
Sources/GUI/ViewModels/ProfileClient.swift
CLI operations
- CLI commands
Sources/CLI/CLIRunner.swift - CLI helper client
Sources/CLI/CLIHelperClient.swift
Other components
- Mac user
- macOS networking
Connections 30
- Mac user → App state and navigation: uses
README.md - App state and navigation → Privileged helper: requests policy
- Rules and blocklists UI → App state and navigation: edits rules
Sources/GUI/Views/RulesManager.swift - Profiles UI → Profile client: manages profiles
- Profile client → Privileged helper: sends commands
- App state and navigation → Connection monitor: shows connections
- App state and navigation → Window and alerts: publishes alerts
Sources/GUI/App/WindowManager.swift - App state and navigation → Insights and map: presents insights
README.md - App state and navigation → Extension lifecycle: manages extension
Sources/GUI/App/SystemExtensionManager.swift - Extension lifecycle → XPC connection: registers IPC
Sources/GUI/App/SystemExtensionManager.swift - CLI commands → CLI helper client: invokes commands
Sources/CLI/CLIRunner.swift - CLI helper client → Privileged helper: sends requests
Sources/CLI/CLIHelperClient.swift - Privileged helper → Rule and policy store: reads and writes
Sources/Helper/HelperService.swift - Privileged helper → DNS proxy: controls proxy
Sources/Helper/HelperService.swift - Privileged helper → pf enforcement: controls enforcement
Sources/Helper/HelperService.swift - Privileged helper → Network monitor service: starts monitoring
Sources/Helper/HelperService.swift - Privileged helper → Insights storage: records insights
Sources/Helper/HelperService.swift - Privileged helper → Blocklist manager: manages lists
Sources/Helper/HelperService.swift - Privileged helper → Policy snapshot bridge: publishes policy
Sources/Helper/HelperService.swift - Privileged helper → XPC connection: serves clients
- DNS proxy → Rule matcher: checks rules
Sources/Helper/DNSProxy.swift - Per-process filter → Rule matcher: checks rules
Sources/NetExt/FilterDataProvider.swift - Per-process filter → Policy snapshot bridge: receives snapshots
Sources/NetExt/FilterDataProvider.swift - Per-process filter → macOS networking: filters traffic
README.md - DNS proxy → macOS networking: handles DNS
README.md - pf enforcement → macOS networking: enforces rules
README.md - Blocklist manager → Rule and policy store: reads and updates
Sources/Helper/BlocklistManager.swift - Network monitor service → Rule and policy store: stores connections
- Insights storage → App state and navigation: supplies summaries
- XPC connection → Policy snapshot bridge: transports snapshots
Sources/Shared/IPCConnection.swift