SCALE 1:1 LOCALHOST SPEC: BESYNX-P2P // V0.4.2 AUTH: ED25519-SIG STATUS: ACTIVE
SYS_ID: BSX-P2P-DAEMON
SECURITY: ZERO-CLOUD / LOCAL-FIRST
DAEMON_ADDR: 127.0.0.1:9098
REPO: github.com/whysooraj/besynx
LICENSE: MIT
ARCHITECTURE // PEER-TO-PEER DATA ENGINE

besynx.daemon

Local-first browser history and session sync daemon written in Rust. Synchronizes browser visits and active cookies across Firefox, Chromium, Brave, and Zen without relying on cloud infrastructure or proprietary accounts.

FIGURE 1.0 // P2P IPC WIREFRAME PORT 9098 [WSS]
CHROME / MV3 queue buffer FIREFOX / MV3 queue buffer BESYNX DAEMON Rust IPC Engine SQLite WAL + Token Ed25519 Ident REMOTE PEER Direct LAN Sync
CLOUD SERVERS
0
Pure local-first loopback
IDENTITY CYPHER
Ed25519
Pairwise mutual auth keys
IPC LATENCY
< 12ms
WebSocket push dispatch
OFFLINE QUEUE
100%
Zero visits dropped
// INTERACTIVE RUNTIME PROTOCOL SIMULATOR

Trigger test event frames to observe how the extension buffer, WebSocket handshake, and SQLite WAL write operate in lockstep:

[DAEMON_INIT] Besynx daemon listening on ws://127.0.0.1:9098
[AUTH] besynx.key identity validated: 0o600 file permissions ok
[DB] SQLite attached: /home/user/.config/besynx/besynx.db (WAL enabled)
[IDLE] Waiting for extension connection frame...
[SEC-01]

Peer-to-Peer Topology & Trust Architecture

┌─────────────────────────┐          ┌─────────────────────────┐
│  Browser A (Chromium)   │          │   Browser B (Firefox)   │
│  MV3 Queue Storage      │          │   MV3 Queue Storage     │
└────────────┬────────────┘          └────────────┬────────────┘
             │                                    │
    [Origin Check]                       [Origin Check]
    [Token: c5f8...]                     [Token: c5f8...]
             │                                    │
             ▼                                    ▼
┌──────────────────────────────────────────────────────────────┐
│                  BESYNX RUST LOCAL DAEMON                    │
│   • Loopback listener on 127.0.0.1:9098                     │
│   • Local SQLite DB (`besynx.db` with WAL journal)          │
│   • Ed25519 Device Identity (`besynx.key` 0600 unix perm)   │
└──────────────────────────────┬───────────────────────────────┘
                               │
                [Mutual Ed25519 P2P Handshake]
                               │
                               ▼
┌──────────────────────────────────────────────────────────────┐
│                    PEER DEVICE / WORKSTATION                 │
│   • Direct LAN broadcast or wireguard mesh                  │
│   • Zero central cloud telemetry or intermediate storage     │
└──────────────────────────────────────────────────────────────┘
          
Zero-Knowledge Sync Principle: The daemon binds exclusively to 127.0.0.1. External telemetry is physically impossible because the daemon does not compile or include any outbound HTTP analytics client. History and cookies are stored unencrypted only inside your local device's isolated SQLite database.
STORAGE // SQLITE SCHEMA (WAL MODE) TABLES: 2
TABLE COLUMN TYPE CONSTRAINT
history id INTEGER PRIMARY KEY AUTOINCREMENT
history url TEXT UNIQUE INDEX (SHA256)
history title TEXT DEFAULT ''
history visit_time INTEGER EPOCH MILLISECONDS
cookies domain TEXT PRIMARY KEY COMPOSITE
cookies name TEXT PRIMARY KEY COMPOSITE
cookies value TEXT SECURE ENCRYPTED BLOB
cookies http_only BOOLEAN FLAG 0 / 1
SECURITY // THREAT VECTOR MITIGATION AUDIT SPEC
THREAT VECTOR RISK LEVEL ENGINEERING MITIGATION
CSWSH Attack CRITICAL Strict Origin header verification + random 64-char token check on handshake
Unauthorized Local App HIGH besynx.token file chmod 0600, requires local user permissions
Cookie Feedback Loop MEDIUM Bidirectional timestamp vector clocks ignore self-originated updates
Network Partition LOW MV3 extension local queue holds visits in memory until daemon re-connects
Cloud Data Leakage ZERO Physically absent cloud client code; 100% air-gappable architecture
[SEC-02]

CLI Quickstart & Pairing Walkthrough

cargo run --manifest-path daemon/Cargo.toml
Compiling besynx-daemon v0.4.0 (/home/whysooraj/Documents/besynx/daemon) Finished dev [unoptimized + debuginfo] target(s) in 2.11s Running `target/debug/besynx-daemon` [2026-11-21 17:30:14] INFO Initializing database `besynx.db`... [2026-11-21 17:30:14] INFO Loading key identity from `besynx.key`... [2026-11-21 17:30:14] INFO Generated auth token `besynx.token` (permissions 0600) [2026-11-21 17:30:14] INFO Besynx daemon listening on 127.0.0.1:9098
[SEC-03]

Architectural Comparison vs Cloud Sync

FEATURE / PARAMETER BESYNX (LOCAL-FIRST) CHROME SYNC FIREFOX SYNC CLOUD EXTENSIONS
Target Storage Local SQLite WAL Google Cloud Servers Mozilla Cloud Servers Third-party AWS / Redis
Cross-Engine Support Firefox + Chromium + Zen Chromium Only Firefox Only Vendor Specific
Cookie Synchronization Yes (Bidirectional + Loop guard) No (Restricted) No (Restricted) Unencrypted JSON upload
Account Requirement Zero (Ed25519 identity key) Google Account Firefox Account Email + Password
Offline Queueing MV3 Local Storage Queue Internal cache Internal cache Events dropped on disconnect