How 7ang0n1n3/omatorsurf works
omatorsurf is a Rust CLI for system-wide Tor routing on Arch Linux/Omarchy. The main workflow is a user invoking start: the CLI hands the operation to the controller, which installs firewall protection, starts application Tor, and verifies the protected route; status and check observe the resulting state. The repository also documents a Quickshell taskbar plugin and a root-owned status publisher. Relationships for sampled Rust modules are supported by source references; broader workflow and plugin links rely on the README, since plugin UI and most controller logic were not excerpted.
Main entry points: controller.rs Routing controller · command.rs Command runner · firewall.rs Firewall rules · tor.rs Tor service
Components 20
CLI and orchestration
- Process entry
src/main.rs - CLI commands
src/cli.rs - Routing controller
src/controller.rs - Configuration
src/config.rs - Privilege checks
src/privilege.rs - Runtime lock/state
src/runtime.rs - Command runner
src/command.rs
Routing protection
- Firewall rules
src/firewall.rs - DNS support
src/dns.rs - Tor service
src/tor.rs - Route probes
src/network.rs
Status and diagnostics
- Status output
src/status.rs - Health checks
src/health.rs
Desktop integration
- Taskbar widget
quickshell-plugin/BarWidget.qml - Plugin backend
quickshell-plugin/Backend.qml - Status publisher
quickshell-plugin/scripts/omatorsurf-bar.py
Other components
- Operator
- Linux services
- Tor network
- Desktop user
Connections 23
- Operator → Process entry: invokes
README.md - Process entry → CLI commands: dispatches
src/main.rs - CLI commands → Routing controller: routes commands
src/cli.rs - Routing controller → Configuration: loads settings
README.md - Routing controller → Firewall rules: manages rules
README.md - Routing controller → Tor service: starts service
README.md - Routing controller → Route probes: verifies route
README.md - Routing controller → Status output: formats observations
README.md - Routing controller → Health checks: runs checks
README.md - Routing controller → Runtime lock/state: records operation
- Routing controller → Privilege checks: checks access
README.md - Firewall rules → Command runner: runs nft
src/firewall.rs - Tor service → Command runner: runs service commands
src/tor.rs - Route probes → Command runner: runs route probes
src/network.rs - Routing controller → DNS support: uses DNS support
src/controller.rs - Command runner → Linux services: executes commands
src/command.rs - Firewall rules → Linux services: applies nft rules
README.md - Tor service → Linux services: controls systemd
src/tor.rs - Route probes → Tor network: checks exit route
README.md - Desktop user → Taskbar widget: uses controls
README.md - Taskbar widget → Plugin backend: opens controls
- Plugin backend → Status publisher: reads observations
README.md - Plugin backend → Process entry: requests changes
README.md