Peer-to-Peer network in python
This is a peer-to-peer network built using Python programming language. The network enables direct communication between nodes (peers) in the network without the need for a central server.
UPDATE : Rewrote the p2p network with
asyncio
- Python 3.x
- Required packages:
asyncio
git clone https://github.com/pj8912/python_p2p.git
cd python_p2p
python peer.py
-
The network uses asyncion to create the server client connection
-
To run this in a single machine clone/copy the repo folder somewhere else and change the server and client ports
-
Example
Node 1:server:6000,client:4000Node 2:server:4000,client:6000
-
So
Node 1server connects toNode 2client viaport:6000 -
On a real p2p network, only one node runs per machine, so you wouldn't have these problems.
- The network does not support secure communication and is vulnerable to hacking and eavesdropping.
- Not for production
- If you are interested in contributing to the development of the P2P network, you can create a pull request with your changes. All contributions are welcome and appreciated.