ShadowNet represents a shift from traditional centralized VPN architectures to a decentralized, peer-to-peer (P2P) mesh topology. This section contrasts these approaches at a low technical level.
In protocol terms, traffic from Node A to Node B is encapsulated and sent to a central Concentrator (C). C decapsulates, inspects routing tables, re-encapsulates, and forwards to B.
Nodes maintain a routing table `O(n)` where `n` is peer count. Traffic is sent directly to the destination's discovered public endpoint using UDP.
In a full mesh of `N` nodes, there are potentially `N*(N-1)/2` connections. Maintaining state for thousands of tunnels is resource-intensive. ShadowNet uses Lazy Loading: tunnels (WireGuard sessions) are often initialized only when traffic is requested, though currently, we eagerly formulate the mesh for small networks.
Identity is cryptographic (Public Key). IP addresses are ephemeral transport details.
If a direct path fails, STUN/Discovery logic re-runs to find new endpoints.
Works behind residential routers, CGNAT (Carrier Grade NAT), and LTE mobile networks.