A command-line tool for creating and seeding torrents using DHT and public trackers. This tool allows you to create magnet links and .torrent files from local files or directories, and immediately start seeding them.
- Create magnet links from files or directories
- Generate .torrent files
- Seeding with DHT (Distributed Hash Table) support
- Integration with public trackers for better peer discovery
- Real-time upload statistics
- Port forwarding support via UPnP
- Support for both single files and directories
- Make sure you have Go 1.16 or later installed
- Clone this repository:
git clone https://github.com/yourusername/eseed.git cd eseed - Build the project:
Or manually:
make build
go build -o eseed
This project includes a Makefile for common development tasks:
# Build the project
make build
# Run tests
make test
# Clean build artifacts
make clean
# Download dependencies
make deps
# Create a test file
make testfile
# Run in development mode
make dev
# Kill any running instances
make kill
# Show all available commands
make helpCreate a torrent and start seeding a file:
./eseed -input path/to/your/file-input: Path to the file or directory to create torrent from (required)-magnet: Only create magnet link (don't create .torrent file)-output: Custom path to save the .torrent file (optional, defaults to input path + .torrent)
-
Create and seed a single file:
./eseed -input myfile.txt
-
Create only a magnet link:
./eseed -input myfile.txt -magnet
-
Create a torrent file with custom output path:
./eseed -input myfile.txt -output custom/path/file.torrent
-
Create and seed a directory:
./eseed -input my_directory
- Uses the
anacrolix/torrentlibrary for BitTorrent functionality - DHT is enabled by default for peer discovery
- Includes popular public trackers for better peer discovery
- Listens on port 42069 by default
- Supports UPnP for automatic port forwarding
- Piece size is set to 256KB for optimal performance
The following public trackers are included by default:
- udp://tracker.opentrackr.org:1337/announce
- udp://tracker.openbittorrent.com:6969/announce
- udp://open.stealth.si:80/announce
- udp://exodus.desync.com:6969/announce
- udp://tracker.torrent.eu.org:451/announce
- The program will continue running until you press Ctrl+C
- Make sure port 42069 is available or change it in the code
- UPnP must be enabled on your router for automatic port forwarding
- The program requires read access to the input file/directory
MIT License - feel free to use this code for any purpose.
Contributions are welcome! Please feel free to submit a Pull Request.