A simple peer to peer protocol for file sharing.
P4 is a simple peer to peer protocol for file sharing. It is designed to be simple and easy to implement. It is a http and gRPC based protocol, with a simple REST API for control and a gRPC for data transfer.
- Python 3.11+
- mutiple peers (it can be addressed by using Docker or modifying each peer working port)
- If using with multiple computers, by default, the 8000 is used as the control port and 8001 is used as the data port, so theses ports should be open in the firewall.
Full setup and user guide can be found in the User manual
- Clone the repository
git clone https://github.com/02loveslollipop/PrimitivePeer2PeerProtocol.git
cd PrimitivePeer2PeerProtocol- (Optional) Create a conda environment
conda create -n p4 python=3.11
conda activate p4- Install the requirements
pip install -r requirements.txt- Start the server
python ./Server/server.py- Start peer server
python ./Peer/peer.py --server- Start peer client
python ./Peer/peer.py