chore: update device-agent submodule + docker-compose + portfolio docs
This commit is contained in:
@@ -107,13 +107,17 @@ Stealth VPN daemon. Cross-platform Go binary.
|
||||
```
|
||||
Every 30 seconds:
|
||||
1. Agent reads last_handshake_time from WireGuard IPC
|
||||
2. Agent computes config_hash = endpoint + internalIP + serverPub
|
||||
3. Agent POSTs {config_hash, last_handshake, tunnel_up} to server
|
||||
4. Server compares with stored config
|
||||
5. If config changed → server responds with new config
|
||||
6. Agent detects change → rebuilds tunnel
|
||||
2. Agent POSTs {device_id, tunnel_up, last_handshake} to server
|
||||
3. Server loads Device + WgServer fresh from DB (dynamic, not cached)
|
||||
4. Server computes config_hash = SHA256(tunnelFields) + ":" + SHA256(forwards)
|
||||
- Tunnel fields: server_pub, endpoint, internal_ip, private_key, preshared_key, allowed_ips, dns
|
||||
- Forwards: sorted protocol:publicPort->targetIP:targetPort:ID
|
||||
5. Server responds with full config + config_hash
|
||||
6. Agent compares config_hash with previous → if different → rebuild tunnel/reload forwards
|
||||
```
|
||||
|
||||
> **Design**: Peers (devices) store only their own data (keys, IP, settings). Node data (endpoint, public key) is loaded fresh from DB on every heartbeat. This ensures config always reflects the latest node state without requiring agent restart.
|
||||
|
||||
### Suspend/Resume Flow
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user