• Stars
    star
    181
  • Rank 211,326 (Top 5 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created almost 4 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

stable, high-performance and low resource consumption BitTorrent client

RTorrent BitTorrent Client

rTorrent is a stable, high-performance and low resource consumption BitTorrent client.

This distribution focuses on additional user-facing features, optimizations and better integrations with modern users of RPC interfaces. One of the long-term goal of this project is to switch from antique XML-RPC to modern protocols with bidirectional capabilities such as gRPC, JSON-RPC over WebSocket or GraphQL, which allows real-time events, less serialization/transfer overheads, better security, etc.

There is NO CHANGE in consensus-layer (BitTorrent protocol). As such, this distribution will behave exactly the same as vanilla rTorrent in the swarm, and there will not be any compatibility issue with certain trackers, if rTorrent 0.9.8 is supported.

Getting started

Installation

Fully static binaries are available at Releases.

# Install rTorrent to /usr/local/bin/rtorrent
# rtorrent-linux-amd64 and rtorrent-linux-arm64 are available
sudo wget https://github.com/jesec/rtorrent/releases/latest/download/rtorrent-linux-amd64 -O /usr/local/bin/rtorrent

# Make it executable
sudo chmod +x /usr/local/bin/rtorrent

# Default configuration
sudo mkdir -p /etc/rtorrent
sudo wget https://github.com/jesec/rtorrent/releases/latest/download/rtorrent.rc -O /etc/rtorrent/rtorrent.rc

# Install as a systemd service (optional)
# This example uses "download" user. Replace it with the an existing user that rTorrent should run with.
sudo wget https://github.com/jesec/rtorrent/releases/latest/download/[email protected] -O /etc/systemd/system/[email protected]
sudo systemctl daemon-reload
sudo systemctl enable rtorrent@download
sudo systemctl start rtorrent@download

Or install with APT repository

Or run with Docker

Or build from source

Use

Run rtorrent

You can execute rTorrent commands to set port, set announced IP, etc.

For example, to launch rTorrent with port 6881 and DHT disabled, rtorrent -o network.port_range.set=6881-6881,dht.mode.set=disable.

Checkout Flood, a modern Web UI for rTorrent.

To learn how to use rTorrent visit the Wiki.

Configuration

Default configuration file is available at doc/rtorrent.rc. It is often installed to /etc/rtorrent/rtorrent.rc.

You may modify the configuration file to fit your needs. Alternatively, use -o, as documented above, to override some configurations but keep using the loaded configuration file.

It is recommended to expand upon the default configuration if user-specific config files (usually placed to $HOME/.rtorrent.rc) are used:

## Import default configurations
import = /etc/rtorrent/rtorrent.rc

## Your configurations
...

rTorrent tries to load a configuration file from several locations:

  • $XDG_CONFIG_HOME/rtorrent/rtorrent.rc (highest priority)
  • $HOME/.config/rtorrent/rtorrent.rc
  • $HOME/.rtorrent.rc
  • /etc/rtorrent/rtorrent.rc (lowest priority)

Or, use -n argument to prevent rTorrent from loading any configuration file. Then you can use -o try_import=<path> to load a config file from an arbitrary location.

Build

Bazel

Bazel 3 or later is required.

Bazel manages most dependencies.

Dependencies are specified by the WORKSPACE file. Sometimes you may want to override a specific dependency with a local repository for easier development. To do that, use override_repository Bazel command line argument. For example, --override_repository=libtorrent=/path/to/local/libtorrent.

Unmanaged dependencies:

  • GCC/Clang compiler toolchain and C/C++ development files (C++17 support required)
# Install Bazel
# Use the build of your system and architecture
# bazelisk-linux-arm64 and bazelisk-darwin-amd64 are also available
sudo wget https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 -O /usr/local/bin/bazel
sudo chmod +x /usr/local/bin/bazel

# Install unmanaged dependencies and build tools
# Use the package manager of your distribution
sudo apt install build-essential

# Clone repository
git clone https://github.com/jesec/rtorrent.git
cd rtorrent

# Build
# By default, the executable is self contained, yet it depends on C/C++ standard libraries of system.
# To generate a fully static executable, use --features=fully_static_link argument.
# Note that glibc have issues that make static executables unreliable.
# If you want fully static, reproducible, portable and stable executable, build with Dockerfile.
bazel build rtorrent

# Binary available at bazel-bin/rtorrent

CMake

CMake 3.5 or later is required.

You have to install dependencies manually to system or let CMake know where to find them.

Dependencies:

  • GCC/Clang compiler toolchain and C/C++ development files (C++17 support required)
  • libtorrent with development files (core dependency, matching version required)
  • libcurl with development files
  • libncurses/libncursesw with development files (for terminal UI)
  • libxmlrpc-c with development files (optional if USE_XMLRPC=OFF, for XML-RPC support)
  • nlohmann/json with development files (optional if USE_JSONRPC=OFF, for JSON-RPC support)
  • googletest with development files (optional, for unit tests)
# Compile and install libtorrent (matching version required)
# Check README of libtorrent for instructions

# Install dependencies and build tools
# Use the package manager of your distribution
sudo apt install build-essential cmake libc6-dev libcurl4-openssl-dev libncursesw5-dev libxmlrpc-c++8-dev libgtest-dev nlohmann-json3-dev

# Clone repository
git clone https://github.com/jesec/rtorrent.git
cd rtorrent

# Configure and generate Makefile
cmake .

# Build
# By default, shared binaries are generated
make

# Binary available at ./rtorrent

# Install (optional)
sudo make install

Docker

Dockerfile

To test: docker run -it jesec/rtorrent

Note that you have to expose BitTorrent port (e.g. -p 50000:50000) and map folders (e.g. -v /home/download:/home/download) yourself.

By default, rTorrent's files are located in $HOME/.local/share/rtorrent. Check doc/rtorrent.rc to know more about the default configurations.

To integrate with Flood, see discussions.

Donate to rTorrent development

Donate

  • Paypal
  • Patreon
  • SubscribeStar
  • BitCoin: 1MpmXm5AHtdBoDaLZstJw8nupJJaeKu8V8
  • Etherium: 0x9AB1e3C3d8a875e870f161b3e9287Db0E6DAfF78
  • LiteCoin: LdyaVR67LBnTf6mAT4QJnjSG2Zk67qxmfQ

Help keep rTorrent development going by donating to its creator.

More Repositories

1

flood

A modern web UI for various torrent clients with a Node.js backend and React frontend.
TypeScript
2,136
star
2

samfirm.js

TypeScript implementation of a streaming downloader, decryptor and extractor of Samsung firmware.
JavaScript
230
star
3

SamFirm.NET

C# implementation of a streaming downloader, decryptor and extractor of Samsung firmware.
C#
37
star
4

android_kernel_samsung_sm8250

C
18
star
5

android_kernel_samsung_universal8890

C
13
star
6

android_kernel_samsung_msm8998

C
11
star
7

pkg-fetch

TypeScript
11
star
8

libtorrent

C++
10
star
9

android_kernel_samsung_universal8895

C
9
star
10

android_kernel_samsung_universal9810

C
9
star
11

android_flashtool

Vue
8
star
12

proprietary_vendor_samsung_xyzq

6
star
13

Heimdall

C++
6
star
14

android_kernel_samsung_universal9830

C
4
star
15

android_device_samsung_msm8998-common

Makefile
4
star
16

android_device_samsung_dream2qlte

Makefile
3
star
17

samfirm-streaming

Streaming CLI SamFirm. Check update, decrypt and extract All-In-One with [MODEL] and [REGION].
C#
3
star
18

android_device_samsung_star2lte

Makefile
3
star
19

android_device_samsung_starlte

Makefile
3
star
20

android_device_samsung_universal9810-common

C++
3
star
21

android_device_samsung_herolte

Makefile
3
star
22

android_device_samsung_exynos-common

C
2
star
23

deb.jesec.io

JavaScript
2
star
24

android_device_samsung_y2q

Makefile
2
star
25

releasetools_kernel_samsung_sm8250

Shell
2
star
26

proprietary_vendor_samsung_xyzs

2
star
27

android_device_samsung_z3q

Makefile
2
star
28

ldid-static

Build script and static Linux binaries of ldid, a "codesign"-like open source utility to sign Darwin (macOS/iOS) executable or package. If you need macOS one, run "brew install ldid" instead.
Dockerfile
2
star
29

android_vendor_qcom_audio-kernel

C
1
star
30

git-sign-demo

1
star
31

android_vendor_qcom_display-drivers

C
1
star
32

android_vendor_qcom_camera-kernel

C
1
star
33

bazel-alpine

Bazel for Alpine Linux (musl libc)
Shell
1
star
34

android_device_samsung_hero2lte

Makefile
1
star
35

android_bootable_recovery

C++
1
star
36

busybox

C
1
star
37

docker-githubrunner

Minimal Github Actions self-hosted runner with Docker
Shell
1
star
38

android_device_samsung_x1q

Makefile
1
star
39

android_vendor_qcom_video-driver

C
1
star
40

android_device_samsung_sm8250-common

Staging branch. Force push allowed. Check @LineageOS for stable branch.
Makefile
1
star