Code Monkey home page Code Monkey logo

cloud-torrent's Introduction

screenshot

Cloud torrent is a a self-hosted remote torrent client, written in Go (golang). You start torrents remotely, which are downloaded as sets of files on the local disk of the server, which are then retrievable or streamable via HTTP.

New Features

This fork adds new features to the original version by jpillora.

  • Run extrenal program on task completed: DoneCmd
  • Stops task when seeding ratio reaching: SeedRatio
  • Download/Upload Rate limit
  • Display transfer stats in web

And some development improvement

  • Use go modules with go 1.12
  • Upgrade torrnet engine API from github.com/anacrolix/torrent

This fork use version number above 1.0.0.

Features

  • Single binary
  • Cross platform
  • Embedded torrent search
  • Real-time updates
  • Mobile-friendly
  • Fast content server
  • External command run on task finished.

Install

Binaries

See the latest release or download and install it now with

Tip: Auto-run cloud-torrent on boot

Docker

Docker Pulls Image Size

$ docker run -d -p 3000:3000 -v /path/to/my/downloads:/downloads boypt/cloud-torrent

Source

Go is required to install from source

$ git clone https://github.com/boypt/cloud-torrent.git
$ cd cloud-torrent
$ go get -v ./...
$ CGO_ENABLED=0 go build -o cloud-torrent -ldflags "-s -w -X main.VERSION=1.X.Y"
# or simplly run `make_release.sh'

Usage

$ cloud-torrent --help


  Usage: cloud-torrent [options]

  Options:
  --title, -t        Title of this instance (default Cloud Torrent, env TITLE)
  --port, -p         Listening port (default 3000, env PORT)
  --host, -h         Listening interface (default all)
  --auth, -a         Optional basic auth in form 'user:password' (env AUTH)
  --config-path, -c  Configuration file path (default cloud-torrent.json)
  --key-path, -k     TLS Key file path
  --cert-path, -r    TLS Certicate file path
  --log, -l          Enable request logging
  --open, -o         Open now with your default browser
  --done-cmd, -d     External cmd to run when task completed, environment variables CLD_DIR / CLD_PATH
                     / CLD_SIZE / CLD_FILECNT are set.
  --help
  --version, -v

  Version:
    1.X.Y

  Read more:
    https://github.com/jpillora/cloud-torrent


Example of config.json

A sample json will be generated on first run of cloud-torrent.

{
  "AutoStart": true,
  "DisableEncryption": false,
  "DownloadDirectory": "/home/ubuntu/Download/cloud-torrent/downloads",
  "EnableUpload": true,
  "EnableSeeding": false,
  "IncomingPort": 50007,
  "SeedRatio": 1.0,
  "UploadRate": "High",
  "DownloadRate": "High",
  "DoneCmd": ""
}

Note: about UploadRate/DownloadRate, a fixed level amoung Low, Medium and High is accepted as value, all other values(or empty) will result in unlimited rate. The actual rate of each level:

  • Low: 50000 Bytes/s (~ 50k/s)
  • Medium: 500000 Bytes/s (~ 500k/s)
  • High: 1500000 Bytes/s (~ 1500k/s)

About DoneCmd

DoneCmd is an external command to be called when a torrent task is finished or one of the files is completed, with following environment variables:

DoneCmd maybe called multiple times if the torrent contains multiple files, each would be called when one of the files is completed(with CLD_TYPE=file), and when whole torrent is complited (with CLD_TYPE=torrent).

CLD_DIR=/path/of/DownloadDirectory
CLD_PATH=Torrent-Downloaded-File-OR-Dir
CLD_SIZE=46578901
CLD_TYPE=torrent|file

Donate

(This Donate goes to original author jpillora)

If you'd like to buy me a coffee or more, you can donate via PayPal or BitCoin 1AxEWoz121JSC3rV8e9MkaN9GAc5Jxvs4.

Notes

This project is the rewrite of the original Node version.

overview

Credits to @anacrolix for https://github.com/anacrolix/torrent

Copyright (c) 2017 Jaime Pillora

cloud-torrent's People

Contributors

jpillora avatar boypt avatar ti avatar jonquach avatar anacrolix avatar cavebeat avatar supriyo-biswas avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.