A peer-to-peer file sharing application built with Rust and libp2p. This project demonstrates how to create a decentralized network where peers can discover each other and share files locally.
Current features:
- 🔍 Automatic peer discovery using mDNS (local network)
- 🤝 Peer identification and metadata exchange
- ❤️ Connection health monitoring with ping/pong
- 🔒 Secure communication using noise protocol
- 📡 TCP transport with yamux multiplexing
Planned features:
- 📁 File listing and sharing
- 🔍 File search functionality
- ⬇️ File download with progress tracking
- 📊 Transfer statistics
- 🎯 Selective file downloading
- Rust 1.70.0 or higher
- Cargo package manager
- Clone the repository:
git clone <repository-url>
cd hello_rust
- Build the project:
cargo build
- Run the application:
cargo run
When you start the application, it will:
- Generate a unique PeerID for your node
- Start listening on a random port
- Automatically discover other peers on your local network
- Display events such as peer discovery, identification, and ping results
src/
├── main.rs # Main application code
└── (more to come) # Future modules for file handling, etc.
libp2p
: Core P2P networking functionalitytokio
: Async runtimefutures
: Async utilitiesserde
: Serialization framework- Other dependencies listed in
Cargo.toml
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- libp2p for the P2P networking framework
- Rust and tokio communities for excellent documentation and support
Note: This is a work in progress. Features and documentation will be updated as the project evolves.