distri_vault is a decentralized file storage system designed to provide secure and efficient data management. It enables peer-to-peer communication, encrypted file storage, and seamless recovery through organized server folders.
By combining peer-to-peer networking and encryption, distri_vault ensures data integrity, confidentiality, and availability, making it ideal for distributed systems.
- Distributed File Storage: Files are stored in a decentralized manner, ensuring redundancy and availability.
- Encryption: Files are encrypted for secure storage on distributed servers, with the original version kept on the primary network.
- Peer-to-Peer Messaging: Enables real-time communication between nodes.
- Data Recovery:
- Files are organized under folders based on server IDs.
- Simplifies folder syncing and file recovery during data loss.
- Buffering and Broadcasting: Efficient data transfer across peers.
- Optimized Codebase: Modular and reusable functions reduce duplication and enhance maintainability.
Component | Description |
---|---|
Programming Language | Go (Golang) |
Encryption | Custom encryption algorithms |
Networking | Peer-to-peer communication protocols |
Storage | File-based organization with folder sync |
```plaintext
distri_vault/
β
βββ main.go # Application entry point
βββ crypto.go # Handles encryption and decryption
βββ peer.go # Manages peer communication
βββ server.go # Manages server-side operations
βββ store.go # Handles data storage and retrieval logic
βββ p2p/ # Handles peer-to-peer communication protocols
β βββ encoding.go # Data encoding for message transmission
β βββ handshake.go # Manages peer handshake process
β βββ message.go # Defines the structure and logic for messages
β βββ tcp_transport.go # Implements transport over TCP
β βββ transport.go # General transport layer abstraction
βββ README.md # Project documentation
- Go (Golang) installed on your system.
- Basic understanding of distributed systems and networking.
- Clone the repository:
git clone https://github.com/your-username/distri_vault.git cd distri_vault
- Run the application:
go run main.go
- Test the peer-to-peer functionality:
- Ensure ports (e.g., 3000 and 4000) are available.
- Use different terminals to simulate multiple peers.
- When a server adds a file, it is automatically stored under a folder named after its server ID.
- Files are synced to distributed servers for redundancy.
- Request specific files or folders by server ID.
- Sync folders to recover data after failure.
- Establish communication between peers using their respective ports.
- Use the Send method in peer.go to broadcast messages.
- Scalability: Support for larger networks and higher data volumes.
- Advanced Encryption: Implementation of zero-knowledge proofs for enhanced security.
- Dynamic Node Management: Adding or removing peers dynamically.
- File Versioning: Maintain multiple versions of the same file for better recovery options.
- ayushn2 - Creator and Maintainer
For any questions or issues, feel free to open an issue or email me.
This project uses the following libraries and tools:
- crypto/aes - Provides AES encryption and decryption functionalities.
- crypto/cipher - Implements block cipher modes and stream ciphers for encryption.
- crypto/md5 - Implements the MD5 hash function.
- crypto/rand - Provides cryptographically secure random number generation.
- encoding/hex - Used for encoding and decoding data in hexadecimal format.
- encoding/gob - Implements the GOB encoding/decoding format for Go objects.
- crypto/sha1 - Provides SHA-1 hashing functionality.
- errors - Implements error handling and custom errors in Go.
- fmt - Implements formatted I/O with functions like Printf, Sprintf, etc.
- io - Provides basic interfaces for I/O operations such as reading and writing.
- log - Implements a simple logging package.
- net - Provides networking and internet protocols.
- os - Provides functions for OS-level operations, such as file manipulation and environment variables.
- strings - Implements functions for string manipulation.
These libraries have been essential in developing the encryption, peer-to-peer communication, and overall functionality of the system. Thank you to the maintainers of these packages!
We welcome contributions to improve the project! Hereβs how you can contribute:
- Click the "Fork" button on the top right corner of the repository page to create a copy of this repository on your GitHub account.
- Clone your forked repository to your local machine:
git clone https://github.com/your-username/distri_vault.git
- Itβs important to create a new branch for each contribution:
git checkout -b your-feature-name
- Make changes or add features to the project. Ensure your code adheres to the existing style and structure of the project.
- Commit your changes with a descriptive message:
git commit -m "Describe your changes here"
- Push your changes to your fork:
git push origin your-feature-name
- Go to your fork on GitHub, and click on "Pull Requests".
- Click the "New Pull Request" button to submit your changes to the original repository.
- Once your pull request is submitted, it will be reviewed, and any necessary discussions will happen. You may be asked to make changes before the pull request is merged.
Please follow our Code of Conduct in all interactions, whether on GitHub or elsewhere.
We appreciate your contributions and look forward to improving the project together!