Skip to content

arya2004/gop2pfs

gop2pfs is a decentralized peer-to-peer file sharing system implemented in Go. It allows users to share and retrieve files across a network of peers without relying on a central server. The system utilizes TCP for network transport and offers optional end-to-end encryption for file transfers and at-rest storage.

Features

  • Decentralized File Sharing: Leverages a peer-to-peer architecture for sharing files directly between nodes.
  • TCP-based Transport: Implements a robust TCP transport layer for reliable communication between peers. This includes message encoding/decoding and connection handling.
  • Customizable File Storage: Provides a flexible file storage mechanism with path transformation capabilities, allowing for organized storage of shared files.
  • Optional Encryption: Supports AES encryption for files both in transit and at rest, enhancing data security and privacy.
  • Modular Design: Built with a clear separation of concerns, with distinct packages for cryptography, peer-to-peer networking, file storage, and server logic.

Getting Started

Prerequisites

  • Go (version 1.24.3 or later recommended)
  • make (for using the Makefile commands)

Building

To build the application, clone the repository and run:

make build

This command compiles the source code and creates an executable binary at bin/gop2pfs.out.

Running

To run the application with a default 3-node network configuration (as defined in cmd/gop2pfs/main.go):

make run

This will first build the application if necessary, and then start the nodes. You can observe the interactions and file sharing (if implemented in main.go) through the console output.

Testing

To execute the unit tests for the internal packages:

make test

This command runs all *_test.go files within the internal directory, ensuring the core components function as expected.

Contributing

We welcome contributions to gop2pfs! Please see our CONTRIBUTING.md file for guidelines on how to contribute, including how to report bugs, suggest features, and submit pull requests.

Code of Conduct

To ensure a welcoming and inclusive environment for everyone, we have adopted a Code of Conduct. Please review our CODE_OF_CONDUCT.md before participating in the project.

License

gop2pfs is licensed under the MIT License. Please see the LICENSE file for more details.

About

Peer-to-Peer File System in Go

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks