Skip to main content

PeerBridge - Peer-to-Peer Process Manager

Project Details

The Peer-to-Peer (P2P) Process Manager is a Python-based Command Line Project designed to facilitate secure file transfer between two peers over a network. The system allows one peer to initiate a file transfer and another to receive it, ensuring security through HMAC-based authentication and encrypted zip file transfers.

Key Features:

  • Secret: You would need a secret word with your friend, otherwise it won't work. Secrecy is the utmost virtue we value
  • File Compression and Encryption: Compresses directories or files into zip archives and encrypts them with a password for secure transmission.
  • Secure Authentication: Uses HMAC (Hash-based Message Authentication Code) to authenticate peers, ensuring that only authorized users can initiate or receive file transfers.
  • Flexible Transfer: Supports both directory and single-file transfers, with the option to send multiple files in sequence.
  • Automatic Port Reuse: Implements socket options to allow the server to reuse ports immediately, reducing the likelihood of encountering port conflicts.

Motivation

The motivation behind the Peer-to-Peer Process Manager was to create a simple yet secure method of transferring files between two devices. Whether for sharing data between colleagues, syncing files across devices, or securely transmitting sensitive information, this tool provides a straightforward solution.

Why P2P?

Peer-to-peer file transfer allows for direct communication between devices without relying on a centralized server. This method increases speed and efficiency while reducing potential points of failure or bottlenecks. Additionally, P2P networks are more resilient, as they do not rely on a single server that could be a target for attacks or system failures.

Installation

To run the Peer-to-Peer Process Manager on your machine, follow these steps:

Prerequisites

  1. Python 3.x: Ensure you have Python 3.x installed on your machine. You can download it from python.org.
  2. pip: Make sure you have pip installed to manage Python packages.

Step 1: Clone the Repository

Clone the project repository from GitHub (replace your-repository-url with the actual URL of your repository):

git clone your-repository-url
cd your-repository-directory

Step 2: Install Required Python Packages

The required Python packages are listed in the requirements.txt file. Install them using the following command:

pip install -r requirements.txt

Step 3: Run the Program

To start the program, navigate to the project directory and run the main script:

python Dhsync.py

Configuration:

  • Hardcoded Paths: The script currently uses hardcoded paths for the directories and files to be transferred. Make sure to update these paths in the script if necessary to match your environment.
  • Port Configuration: By default, the program uses port 8080 for connections. If this port is in use or you want to use a different port, you can modify the port settings in the main() function.

Step 4: Usage

Upon running the script, you will be prompted to choose whether to initiate a file transfer or to receive one:

  • Initiate a Process: Choose this option to compress and encrypt a directory or file and send it to the receiving peer.
  • Receive a Process: Choose this option to receive a file from a peer, authenticate the sender, and decrypt the file on your local machine.

Follow the on-screen instructions to complete the file transfer process.

Troubleshooting

Common Issues:

  • Port Already in Use: If you encounter an error stating that the port is already in use, ensure that no other processes are using the specified port, or configure the script to use a different port.
  • Authentication Failed: If authentication fails, double-check the secret key being used by both peers. The secret key must match exactly on both sides.
  • File Transfer Errors: Ensure that the file paths and directories specified in the script exist and have the correct permissions for reading and writing.

Additional Help:

If you run into issues not covered here, consult the error messages provided by the script, and ensure that all dependencies are installed correctly.

Future Enhancements

Potential future improvements to the project could include:

  • Dynamic Path Configuration: Allowing users to specify paths dynamically during runtime instead of using hardcoded values.
  • GUI Interface: Creating a graphical user interface (GUI) to make the tool more user-friendly.
  • Additional Security Features: Implementing more advanced encryption methods or multi-factor authentication for enhanced security.
  • Cross-Platform Compatibility: Ensuring the tool works seamlessly across different operating systems (Windows, macOS, Linux).

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions to the project are welcome! Feel free to fork the repository, create a feature branch, and submit a pull request with your enhancements or bug fixes.


Thank you for using the Peer-to-Peer Process Manager!
Feel free to reach out for any questions or support related to this project.

Metadata

Release files for peerbridge 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peerbridge 0.2.1
File Size Uploaded
peerbridge-0.2.1.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for peerbridge 0.2.1
File Interpreter ABI Platform
peerbridge-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.5 kB

Release files / peerbridge-0.2.1.tar.gz

Download URL peerbridge-0.2.1.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
24bfb82dda620726fed9c2eda53eaf4712df5dcd33c7b75cf64fbe1169c72164
BLAKE2b-256 checksum
How to use checksums
6d089f2a412f47ed928446cc91e50acd88c7c4e1b7b5a9662c876590e0c668d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release files / peerbridge-0.2.1-py3-none-any.whl

Download URL peerbridge-0.2.1-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e22bb1559d0b9d68a4e69e573b48b9a88781ab3652cb98bb371d44d5f8252ce
BLAKE2b-256 checksum
How to use checksums
1d10a94baac4a7e8101e28c8d1257633fa6a2fb3dacb765918c87df791dee50b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page