How shark-empire/mitos-network works
mitos-network is a Linux network-management daemon, not a TCP/IP stack. A local client sends requests over Unix-socket IPC; the daemon’s manager handles policy and dispatches operations such as device discovery, Wi-Fi, connections, firewall, proxy, and sharing, then reports state and events. Network configuration and saved profiles are separate concerns. The README documents additional VPN, Bluetooth, DHCP, DNS, routing, and monitoring capabilities. Sampled source confirms the daemon/IPC/manager path and selected operations; links for unsampled subsystem internals are omitted where wiring is uncertain.
Main entry points: manager.rs Network manager · main.rs Daemon entry · server.rs IPC server · mitos-netctl.rs mitos-netctl
Components 30
Control plane
- mitos-netctl
bin/mitos-netctl.rs - Daemon entry
src/main.rs - IPC server
src/ipc/server.rs - Network manager
src/manager/manager.rs - Periodic scheduler
src/manager/scheduler.rs - Configuration
src/config/mod.rs
Devices and links
- Device registry
src/device/manager.rs - Device discovery
src/device/discovery.rs - Connections
src/connection/mod.rs - Wi-Fi
src/wifi/mod.rs - Ethernet
src/ethernet/mod.rs - Bluetooth
src/bluetooth/mod.rs
Network services
- IP and netlink
src/ip/mod.rs - DHCP clients
src/dhcp/mod.rs - DNS
src/dns/mod.rs - Routing policy
src/routing/mod.rs - VPN
src/vpn/mod.rs - Internet sharing
src/sharing/mod.rs - Connectivity checks
src/connectivity/mod.rs
Policy and state
- Firewall
src/firewall/mod.rs - Proxy and PAC
src/proxy/mod.rs - Profiles and state
src/persistence/mod.rs - Diagnostics and health
src/monitoring/mod.rs
System integrations
- Linux kernel
- wpa_supplicant
- nft
- OpenVPN
- bluetoothctl
- hostapd
Other components
- Local client
Connections 25
- Local client → mitos-netctl: invokes
- mitos-netctl → IPC server: sends requests
- Daemon entry → Configuration: loads
- Daemon entry → Network manager: starts
- Daemon entry → IPC server: starts
- Daemon entry → Periodic scheduler: starts
- IPC server → Network manager: dispatches requests
- Network manager → Device registry: queries and refreshes
- Network manager → Connections: activates profiles
- Network manager → Wi-Fi: handles Wi-Fi requests
- Network manager → Firewall: handles firewall requests
- Network manager → Proxy and PAC: applies and resolves
- Network manager → Internet sharing: starts hotspots
- Network manager → Profiles and state: loads and saves profiles
- Network manager → Connectivity checks: tracks connectivity
- Network manager → Diagnostics and health: serves diagnostics
- Periodic scheduler → Network manager: sends timer commands
- Device discovery → Linux kernel: monitors netlink
- Device registry → Device discovery: scans devices
- IP and netlink → Linux kernel: configures via netlink
- Wi-Fi → wpa_supplicant: controls
- Firewall → nft: applies rules
- VPN → OpenVPN: controls sessions
- Bluetooth → bluetoothctl: controls devices
- Internet sharing → hostapd: runs access point