Skip to content

netsys-lab/bittorrent-over-scion

Repository files navigation

BitTorrent over SCION

BitTorrent client written in Go. Uses SCION's pathawareness with the pathdiscovery library.

Install

go get github.com/netsys-lab/bittorrent-over-scion

Usage

To use this Bittorrent client (at the moment, SCION usage is mandatory. We will support also TCP in the future), you need to have at least a SCION endhost (or a full SCION AS) running. The easiest way is to join SCIONLab and create two user ASes or to run a local SCION topology (steps 7-10, to connect to a specific SCION Daemon, use the SCION_DAEMON_ADDRESS environment variable) with multiple ASes.

Finally, a valid .torrent file is required to start BitTorrent as seeder. To generate a torrent from a local file, you can use anacrolix torrent-create tool: go run github.com/anacrolix/torrent/cmd/torrent-create samplefile >> samplefile.torrent.

Run a seeder

The following command runs BitTorrent as a seeder:

./bittorrent-over-scion -inPath='sample.torrent' -seed=true -file='sample.file' -local="19-ffaa:1:000,[127.0.0.1]:46000"

At least the following command line flags are required:

  • inPath: Source .torrent file
  • file: Source file from which the .torrent file was created
  • seed: Start as seeder
  • local: The full local SCION address, of format ISD-AS,[IP]:Port,

Run a leecher

The following command runs BitTorrent as a leecher:

./bittorrent-over-scion -inPath='sample.torrent' -outPath='sample.file' -peer="19-ffaa:1:000,[127.0.0.1]:46000" -seed=false -local="19-ffaa:1:111,[127.0.0.1]:43000" 

At least the following command line flags are required:

  • inPath: Source .torrent file
  • outPath: Destination to which BitTorrent writes the downloaded file
  • seed: Start as leecher (seed=false)
  • local: The full local SCION address, of format ISD-AS,[IP]:Port,
  • peer: The full remote SCION address, of format ISD-AS,[IP]:Port,

Help Info

Run bittorrent-over-scion -h to get a full overview of all command line flags and their explanations.

Demo Torrent

We provide a running seeder and a sample torrent file in the demo folder. Please visit the readme for further information.

Roadmap

  • Support SCION HTTP tracker
  • Support Dht based peer discovery
  • Support magnet links
  • Support multi-file torrents
  • Support multiple torrents by one running instance
  • Support TCP and SCION connections depending on peer information
  • Add a GUI on top of the command line client

License

This project is licensed under the GPLv3 license. However, for accurate information regarding license and copyrights, please check individual files.

Security

This project is at the moment under ongoing development. API's or expected behavior may change in further versions. In case you observe any security issues, please contact me via mail.