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.
- 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.
- Go (version 1.24.3 or later recommended)
make(for using the Makefile commands)
To build the application, clone the repository and run:
make buildThis command compiles the source code and creates an executable binary at bin/gop2pfs.out.
To run the application with a default 3-node network configuration (as defined in cmd/gop2pfs/main.go):
make runThis 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.
To execute the unit tests for the internal packages:
make testThis command runs all *_test.go files within the internal directory, ensuring the core components function as expected.
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.
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.
gop2pfs is licensed under the MIT License. Please see the LICENSE file for more details.