Database Schema
All databases are in SQLite format and operate in WAL (Write-Ahead Logging) mode. They are divided into two categories: persistent data (included in backups) and runtime state (managed by bridge structures — reflects the OS and kernel state of the respective component, contains no portable or user-specific data).
wallet.db
Contains the client pool, subnet configuration, and DNS settings.
exit.db
Contains exit tunnel configurations and multihop state.
device.db
Persists WireGuard interface state. A separate device.db is created for each
interface (/var/lib/phantom/state/db/wireguard/{ifname}/).
firewall.db
Contains firewall rule groups, firewall rules, and routing rules. Supports atomic rule application and cascade delete.