Skip to content

02loveslollipop/PrimitivePeer2PeerProtocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Primitive Peer 2 Peer Protocol (P4)

A simple peer to peer protocol for file sharing.

Intro

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.

Requirements

  1. Python 3.11+
  2. mutiple peers (it can be addressed by using Docker or modifying each peer working port)
  3. 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.

Quick Start

Full setup and user guide can be found in the User manual

  1. Clone the repository
git clone https://github.com/02loveslollipop/PrimitivePeer2PeerProtocol.git
cd PrimitivePeer2PeerProtocol
  1. (Optional) Create a conda environment
conda create -n p4 python=3.11
conda activate p4
  1. Install the requirements
pip install -r requirements.txt
  1. Start the server
python ./Server/server.py
  1. Start peer server
python ./Peer/peer.py --server
  1. Start peer client
python ./Peer/peer.py

About

A simple centralized P2P protocol for file exchange

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published