#connection #p2p #nat-traversal #reliable #automatic #networking #messages

unmaintained crust

Peer-to-peer networking library. Automatically reconnect and manage connections.

86 releases

Uses old Rust 2015

0.32.1 Jun 4, 2019
0.31.0 Aug 24, 2018
0.30.0 Dec 26, 2017
0.28.1 Sep 14, 2017
0.2.2 Jul 31, 2015

#22 in #nat-traversal

Download history 111/week @ 2024-07-23 163/week @ 2024-07-30 116/week @ 2024-08-06 131/week @ 2024-08-13 80/week @ 2024-08-20 2/week @ 2024-09-03 6/week @ 2024-09-10 9/week @ 2024-09-17 115/week @ 2024-09-24 102/week @ 2024-10-01 76/week @ 2024-10-08 81/week @ 2024-10-15 81/week @ 2024-10-22 65/week @ 2024-10-29 68/week @ 2024-11-05

361 downloads per month
Used in 10 crates (2 directly)

MIT OR BSD-3-Clause

410KB
5K SLoC

Crust

Reliable p2p network connections in Rust with NAT traversal. One of the most needed libraries for any server-less, decentralised project.

Crate Documentation Linux/OS X Windows Issues
Documentation Build Status Build status Stories in Ready
MaidSafe website SAFE Dev Forum SAFE Network Forum

Overview

crusty

Crust is a low level networking library that is optimised for peer-to-peer connections and data transportation. It implements primitives to connect two peers together and start exchanging messages in a secure, reliable way. It supports multiple protocols (UDP and TCP hole-punching) and it is crypto secure - all communications, starting with handshake messages, are encrypted. It also provides other security features like randomised ports that are used to prevent targeting a particular known port to conduct DoS attacks. Crust implements several NAT traversal techniques such as hole punching and use of IGD.

Upcoming Features / Benefits

Multi-protocol expansion

Adding to the existing TCP & UDP hole-punching protocols Crust will soon include TCP-direct and introduce µTP, which wraps UDP and adds reliability, congestion control and ordered delivery to make a more robust and a better paradigm. Supporting multiple protocols means that if a firewall/router does not support one particular protocol then the network switches to another to get connected. If the firewall/router supports all protocols then Crust chooses the 1st protocol that successfully establishes the connection.

Secure serialisation

The network encrypts everything handed to it for transportation automatically. With Secure serialisation we have negated MITM attack as everything on the network is encrypted at each network hop. Also, the node signing each packet provides non-repudiation as the sender cannot deny that they signed the packet.

Bootstrap cache

Bootstrap caching enhances the concept of using genesis nodes (hard-coded addresses) for initial vault detection by dynamically creating a list of nodes which are directly reachable without the need to hole-punch. This list is appended and pruned as nodes connect/disconnect to the network so is always kept up-to-date.

License

This Crust library is dual-licensed under the Modified BSD ( LICENSE-BSD) or the MIT license ( LICENSE-MIT) at your option.

Contribute

Copyrights in the SAFE Network are retained by their contributors. No copyright assignment is required to contribute to this project.

Dependencies

~17MB
~304K SLoC