Develop - #7
Conversation
The data plane corrupted itself under load: an exit node pushes packets from many goroutines and nothing kept two writers off one TLS connection. - writeFrame emitted the 12-byte header and the payload as two separate Writes, so a concurrent writer could land between them and a write deadline could expire mid-frame. Either one desynchronises the peer's framing for the life of the connection. Build the frame in a single pooled buffer and emit it with one Write. - Client.SendPacket released the mutex before writing, so DATA frames raced each other and the ping loop's control frames. Serialise every write on a dedicated writeMu, separate from mu so a stuck write cannot block state reads or Stop. - Close the connection on any write error, client and server alike. A single Write can still flush partially, so the stream can no longer be framed and the peer has to reconnect instead of parsing garbage. - Give the pre-session HELLO write a deadline as well, or a stalled handshake write hangs the supervisor. Registry: add DetachSession, which drops a peer only when the caller's session is still the registered one. A reconnecting client attaches its new session before the old read loop finishes unwinding, so the old session's unconditional Detach evicted the live one and left the peer looking session-less. Add PeerIDs so a gateway can enumerate peers that actually have a session and divert only those onto TCP.
This workflow automates the release process for the proxy Go module, allowing version tagging and GitHub Releases.
NM-295: force-close TCP uplink sessions on Server.Stop
|
Review complete. No issues found — approved ✅. This PR introduces an
Note: a few scan passes (correctness group 0, the networking-transport and registry-lifecycle domain specialists, and the holistic pass) did not publish artifacts; the remaining passes and the verifier covered the diff. Reviewed commit: be78b4e |
Replace raw TLS streaming with WebSocket (/uplink/v1), keep framed WG auth inside binary messages, and add explicit connect/auth logs with client IP.
defaultWSPingInterval = 25s defaultWSPongWait = 60s Read deadline (initial + on Pong) = pingInterval + pongWait (85s by default)
NM-295: migrate TCP uplink to WSS with selfsigned and proxy TLS modes
No description provided.