Skip to content

Security Model

itwillsync is designed for local network use. All communication stays on your WiFi or Tailscale VPN. No data is sent to any cloud service.

Token Authentication

Every endpoint requires a cryptographic token for access.

Token Hierarchy

TokenScopeHow you get it
Master tokenDashboard access (all sessions)QR code on first session start
Session tokensIndividual terminal accessDelivered by dashboard over WebSocket

Tokens are 64-character hex strings (256 bits of entropy). They're generated using crypto.randomBytes(32) and validated with constant-time comparison (timingSafeEqual) to prevent timing attacks.

What this means in practice

  • Knowing an IP + port is not enough — you need the token
  • The token is embedded in the QR code URL
  • Someone port-scanning your machine sees an HTTP server but can't access anything without the token
  • Brute-forcing a 256-bit token would take longer than the age of the universe

Rate Limiting

If someone tries to connect with an incorrect token:

  • 5 failed attempts from the same IP triggers a 60-second lockout
  • During lockout, all requests from that IP return HTTP 429

The legitimate user (who has the token from the QR code) never triggers this.

Network Boundaries

InterfaceBindingAuthPurpose
Dashboard server0.0.0.0:7962Master tokenPhone access
Internal API127.0.0.1:7963None (localhost only)Session registration
Session servers0.0.0.0:dynamicSession tokenTerminal access

The internal API is bound to 127.0.0.1 — only processes on your machine can reach it. This is an OS-level guarantee.

Static Assets

Dashboard JavaScript and CSS files are served without token validation. These are bundled build artifacts containing no sensitive data. Security is enforced on the WebSocket connection, which always requires the master token.

Released under the MIT License.