This repository contains the source code for a P2P (Peer-to-Peer) Mesh Network application. The project is designed to facilitate file sharing and peer discovery in a decentralized manner.
- Peer Discovery: Automatically discover and connect to peers in the network.
- File Sharing: Share files with connected peers.
- Web UI: Manage peers and files through a web-based user interface.
- Encryption: Secure file transfers using RSA encryption.
internal/crypto
: Contains encryption-related code.internal/dht
: Implements the Distributed Hash Table (DHT) for peer discovery.internal/node
: Core logic for managing peers and files.internal/transfer
: Handles file chunking and transfer.internal/webui
: Web UI for managing the network.main.go
: Entry point for the application.
- Go 1.23.2 or later
-
Clone the repository:
git clone https://github.com/itsfuad/P2P.git cd P2P
-
Build the project:
go build -o p2p
-
Run the application:
./p2p -port 3000 -webui 8080
To run the tests, use the following command:
go test ./...
- Start the application using the command mentioned in the installation section.
- Open your browser and navigate to
http://localhost:8080
to access the Web UI. - Use the Web UI to manage peers and share files.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under LICENSE file for details.
- The Go Authors for the Go programming language.
- Open-source community for various libraries and tools.