jTorrent is a simple Tor network simulation client and server written in Java. This client allows users to download and share files using the TCP protocol, which is a peer-to-peer file sharing protocol. The Tracker (which acts as a mediator between the peers) keeps track of files in network and peers who are still connected.
- Multi-protocol Support: TCP for file sharing and UDP for tracking.
- Concurrent Connections: Allows many peers to be connected in the network at the same time.
- (WIP) File Verification: Verifies the integrity of downloaded files using SHA-1 hashes.
- Peer Management: Manages connections to multiple peers efficiently via Tracker.
- Cross-Platform: Runs on any platform with Java support.
- Java Development Kit (JDK) Latest Release
- Gradle (for dependency management and build)
- clone the repository
git clone https://github.com/Amirali-Amirifar/jtorrent.git
cd jtorrent
-
Build the project
./gradlew build
-
run
TrackerMain
andPeerMain
to connect start simulation.
There are several commands to communicate to other peers and the tracker.
set_name <name>
get_peers
list_files
share <filename>
get <filename> <peerIp>:<peerTcpPort>
This project is licensed under the Gnu/GPL3 License. See the LICENSE file for details.
For issues, questions, or contributions, please open an issue on GitHub or contact the repository owner directly.