rtorrent

更新時間: 2018-03-06

介紹

 

Using the libtorrent library

目錄

- 安裝
- 我的設定值
- HotKey
- 編譯
- Signal handlers

 


安裝

 

Install

apt-get install -y rtorrent

建立目錄

mkdir /home/bt

cd /home/bt

mkdir tmp session finish watch

複製設定

cp /usr/share/doc/rtorrent/examples/rtorrent.rc ~/.rtorrent.rc

cp /usr/share/doc/screen/examples/screenrc ~/.screenrc

 


HotKey

 

Ctrl + s      # 開始下載

Ctrl + k      # 停止下載

Ctrl + d      # 清除Torrent

Ctrl + r       # check file hash

Ctrl+ q       # 離開 rtorrent

限定最大上傳速度:

# throttle by 1/5/50 KB
a / s / d      # 加速
z / x /c       # 減速

Add a torrent url or path

按 backspace 會出現

load.start>

查看 "screen" 的 key bindings

Ctrl+ a + ?

View

l

View log. Exit by pressing the spacebar

0

[View: active]

1

[View: main]

3

Show started downloads

4

[View: stopped]

5

Show complete downloads

6

[View: incomplete]

Tracker list View Keys

* Enable/disable tracker

space Rotate trackers in a group
 


我的設定值

 

rtorrent 的設定值是存放在 ~/.rtorrent.rc 內的, 以下是我的設定值

#### Net

# Try to open a listening port in the range
port_range = 11001-11500
# Open the listening port at a random position in the "port_range"
port_random = no

#### 未完成的下載的 Connection (per torrent)

min_peers = 40
max_peers = 100

#### 播種設定 (per torrent)

min_peers_seed = 5
max_peers_seed = 15

#### Speed (KiB)

max_uploads = 15
upload_rate = 200
download_rate = 0

#### Folder

# 放下載中的 File
directory = /home/bt/tmp

# Make sure you don't run multiple instance of rtorrent using the same session directory.
# rtorrent.dht_cache, rtorrent.lock, ?.torrent
session   = /home/bt/session

#### schedule Jobs

# 如果在 /home/bt/watch/ 裡有 .torrent 檔時, 那就下載它
schedule = watch_directory,5,5,load_start=/home/bt/watch/*.torrent

# 當 harddisk 餘下 100M 時停止下載
schedule = low_diskspace,5,60,close_low_diskspace=100M

# 當完成時, 做 seed share 2 倍, 當 file < 50M 時, share 3 倍
schedule = ratio,60,60,"stop_on_ratio=200,50M,300"

# 下載完成後會移 file 到 /home/bt/finish
on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,/home/bt/finish;d.set_directory=~/bt/finish"

#### Feature


use_udp_trackers = yes
encoding_list = UTF-8
check_hash = yes

# Enable DHT support

# auto: start and stop DHT as needed
dht = auto
dht_port = 6881
peer_exchange = yes

# Default: no
peer_exchange = yes

# Encryption options
# Default: none
# allow_incoming: 
# try_outgoing: 
# require: disable  unencrypted  handshakes
# enable_retry: if  the  initial outgoing connection fails, retry with encryption toggle
encryption = allow_incoming,enable_retry,prefer_plaintext



#### System

hash_read_ahead = 10
hash_interval = 100
hash_max_tries = 10

 


編譯

 

由於在 apt 庫的包相當舊, 如果想用較新版而又唔想編譯的話, 那可以在以下網址下載別人編譯好的 deb 包

網址: ???

*自已編譯:*

libncursesw5 (不要用 libncurses5 )

 


Signal handlers

 

SIGINT Normal shutdown with 5 seconds to send the stopped request to trackers.

SIGTERM Shut down immediately.

 

Creative Commons license icon Creative Commons license icon