Bitwarp is a peer-to-peer file sharing system written in Go.
It uses gRPC for file transfers. A tracker service (with multiple instances) uses Redis to maintain metadata of chunk holders. These trackers are load balanced using HAProxy and kept in sync via RabbitMQ.
- A peer (the seeder) seeds a file into the network.
- Other peers contact the tracker to get the list of chunk holders.
- Instead of downloading all chunks from the seeder, peers fetch specific chunks from other peers.
- Peers then upload their chunks to others, enabling distributed sharing.
This leads to an efficient swarm-like mechanism, where chunks of a file are exchanged among nodes.
- Go 1.24.2
- Latest Docker and Docker Compose
make
Install make if not available:
sudo apt install makemake buildPlace the actual file to be shared in the storage/downloads directory.
Then generate a warp file:
go run cmd/warpgen/main.go storage/downloads/<your_file>This will create a corresponding warp JSON file in storage/warp.
Update docker-compose.yaml with the generated file name.
Spin up trackers and nodes:
docker compose up --scale tracker=2 --scale node=5You’ll now observe chunks being transferred and shared among the nodes.
Open-source contributions are welcome. Feel free to fork, suggest changes, or file issues.
This project is licensed under the MIT License.