How the bore protocol works
mainThe bore protocol uses a control port (default 7835) to manage connections:
- Initialization: The client sends a "Hello" message to the server on the control port, requesting to proxy a specific remote port.
- Acknowledgement: The server acknowledges and begins listening for external TCP connections on that remote port.
- Connection Handshake: When an external connection hits the remote port, the server generates a unique UUID and sends it back to the client.
- Acceptance: The client opens a separate TCP stream to the server and sends an "Accept" message containing that UUID.
- Proxying: The server then proxies traffic between the two connections.
Note: To prevent memory leaks, the server discards incoming connections if the client does not "Accept" them within 10 seconds.