-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement handshake between server and client #156
Comments
2: "Encryption handshake, if we are going to use TLS or similar (#41)" 3: Expose an API for handling new connections Yea, I am wondering if this is in the scope of laminar, we have two factors here connection management by the user and connection management for laminar. Laminar Lets first define what we currently do to manage connections and how we notify the user of this. ActiveConnections; this is responsible for keeping track of active connections. When a connection sends something we update the last heard, if the client does not exists yet we create it. We check at some interval for idling connections and if it is then we notify the user via an event channel that a connection has disconnected. This way, users can already keep track of idling connections, however, we don't yet send a User Because we send those events back to the user is able to interpret on that. We could use a similar way to update the client information, like client metrics could be
If we would go for this method we wouldn't be able to drop the connection, refuse connections, accept connections yet. The points that fall within the scope of laminar are:
Laminar should almost accept all packets from everyone and accept all connections, and it should be up to the user of laminar to decide if wants to remove or ban a connection based on its behaviour seen from the metrics gotten from the metrics. The user should and can maintain the connections itself based on |
Interesting read: https://github.com/networkprotocol/netcode.io/blob/master/STANDARD.md |
I am going to work on this, currently looking into various resources in order to get a good implementation: gaffer: http://web.archive.org/web/20181107181442/https://gafferongames.com/post/client_server_connection/ open beta bool: http://ithare.com/udp-for-games-security-encryption-and-ddos-protection/ |
After a discussion in Discord about questioning the point of sending the protocol version with every package, some people (including me) pointed out that the issue could be resolved by putting it into a handshake process.
Additionally "packet defense mechanism" came up.
So I'm just going to put out ideas here, I'm still new to laminar, so I don't know whats on the roadmap or if some of these ideas don't work with the current implementation, please bear with me:
Ideas that could be included into a Handshake
Points 1. and 2. I think are reasonable and are not really out of scope.
Point 3. could be completly out of scope for laminar, I don't know, but I don't see a proper way how to handle packet defense without the ability to let the user determine if an incoming connection is valid or not, laminar itself can only determine it by invalid protocol version or failed TLS handshake. A user can determine through things like login or whitelisting IPs through an external authorization process.
The text was updated successfully, but these errors were encountered: