connection-layer

Datagram Connection Hash Layer

2 releases

new 0.0.2 Oct 17, 2024
0.0.1 Sep 24, 2024
Download history 148/week @ 2024-09-22 14/week @ 2024-09-29 4/week @ 2024-10-06

166 downloads per month

MIT license

28KB
520 lines

Connection Layer Codec for Datagram Transports

Overview

This Rust library provides a codec layer over datagrams (typically over UDP) to assign connection IDs (u8) and use a Murmur3 hash to verify incoming datagrams. It enables you to implement connection-oriented communication over a connectionless transports, allowing for simple connection management and data integrity verification.

Features

  • Connection Management: Assigns unique connection IDs to clients, enabling the host to manage multiple connections.
  • Data Integrity: Uses Murmur3 hashing with a seed to verify the integrity of incoming datagrams.
  • Simple API: Provides easy-to-use encoders and decoders for both host and client sides.

Security Considerations

[!IMPORTANT] The connections established using this codec are, by design, not secure. Data is transmitted in plain text and can be intercepted or modified by attackers. There is no protection against eavesdropping, man-in-the-middle attacks, or other network-based threats.

Installation

Add the following to your Cargo.toml:

[dependencies]
connection-layer = "0.0.1"

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are not accepted. This project is exclusively maintained by the author to retain full control and copyrights.

Dependencies

~395–670KB
~11K SLoC