fix(app): harden Hivemind control-plane trust boundaries #8

Merged
Naveax merged 1 commits from pr/harden-control-plane-trust-boundary into main 2026-09-06 11:34:06 +03:00
Naveax commented 2026-09-03 23:28:39 +03:00 (Migrated from github.com)

Summary

Harden control-plane responses before they can influence VPN runtime configuration.

Changes

  • Disable HTTP redirects for control-plane requests
  • Limit control responses to 256 KiB
  • Bind session responses to the expected nonce
  • Make cancellation generation-scoped
  • Validate VLESS UUID and REALITY/XHTTP fields
  • Pin the tunnel destination to the compiled public IP
  • Pin the tunnel port to 443
  • Reject private, reserved, malformed or unexpected addresses
  • Build VLESS URLs with Uri instead of manual concatenation

A compromised API/domain can fail a session but cannot silently redirect the VPN tunnel to another server.

## Summary Harden control-plane responses before they can influence VPN runtime configuration. ## Changes - Disable HTTP redirects for control-plane requests - Limit control responses to 256 KiB - Bind session responses to the expected nonce - Make cancellation generation-scoped - Validate VLESS UUID and REALITY/XHTTP fields - Pin the tunnel destination to the compiled public IP - Pin the tunnel port to 443 - Reject private, reserved, malformed or unexpected addresses - Build VLESS URLs with Uri instead of manual concatenation A compromised API/domain can fail a session but cannot silently redirect the VPN tunnel to another server.
Sign in to join this conversation.