Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rtorrent-docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janne Mareike Koschinski
rtorrent-docker
Commits
9405fc9a
Verified
Commit
9405fc9a
authored
2 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
fix: solve bugs with initial implementation
parent
23e1bfe1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2875
passed
2 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
daemon/entrypoint.sh
+2
-2
2 additions, 2 deletions
daemon/entrypoint.sh
daemon/src/rtorrent.conf
+37
-81
37 additions, 81 deletions
daemon/src/rtorrent.conf
wireguard/entrypoint.sh
+12
-1
12 additions, 1 deletion
wireguard/entrypoint.sh
with
51 additions
and
84 deletions
daemon/entrypoint.sh
+
2
−
2
View file @
9405fc9a
...
...
@@ -3,10 +3,10 @@ set -euo pipefail
rm
/tmp/rtorrent.log
touch
/tmp/rtorrent.log
rm
/
data
/.session/rtorrent.lock /
data
/.session/rtorrent.pid
rm
/
tmp
/.session/rtorrent.lock /
tmp
/.session/rtorrent.pid
# Start rtorrent as a daemon with the setting in the config file
# & to actually run it in the background
rtorrent
-n
-o
"import=/rtorrent.c
onf
"
&
rtorrent
-n
-o
"import=/rtorrent.
r
c"
&
tail
-f
/tmp/rtorrent.log
This diff is collapsed.
Click to expand it.
daemon/src/rtorrent.conf
+
37
−
81
View file @
9405fc9a
#############################################################################
# A minimal rTorrent configuration that provides the basic features
# you want to have in addition to the built-in defaults.
#
# See https://github.com/rakshasa/rtorrent/wiki/CONFIG-Template
# for an up-to-date version.
#############################################################################
method
.
insert
=
cfg
.
download
,
private
|
const
|
string
, /
data
/
method
.
insert
=
cfg
.
tmp
,
private
|
const
|
string
, /
tmp
/
method
.
insert
=
cfg
.
logfile
,
private
|
const
|
string
, (
cat
,(
cfg
.
tmp
),
"rtorrent.log"
)
method
.
insert
=
cfg
.
session
,
private
|
const
|
string
, (
cat
,(
cfg
.
tmp
),
".session/"
)
fs
.
mkdir
= (
cat
,(
cfg
.
session
))
## Instance layout (base paths)
method
.
insert
=
cfg
.
basedir
,
private
|
const
|
string
, (
cat
,(
system
.
env
,
RT_BASE_DIR
))
method
.
insert
=
cfg
.
tmpdir
,
private
|
const
|
string
, (
cat
,
"/tmp/"
)
method
.
insert
=
cfg
.
download
,
private
|
const
|
string
, (
cat
,(
cfg
.
basedir
),
"download/"
)
method
.
insert
=
cfg
.
logs
,
private
|
const
|
string
, (
cat
,(
cfg
.
tmpdir
),
"log/"
)
method
.
insert
=
cfg
.
logfile
,
private
|
const
|
string
, (
cat
,(
cfg
.
logs
),
"rtorrent.log"
)
method
.
insert
=
cfg
.
session
,
private
|
const
|
string
, (
cat
,(
cfg
.
basedir
),
".session/"
)
method
.
insert
=
cfg
.
watch
,
private
|
const
|
string
, (
cat
,(
cfg
.
basedir
),
"watch/"
)
## Create instance directories
execute
.
throw
=
sh
, -
c
, (
cat
,\
"mkdir -p \"",(cfg.download),"
\
" "
,\
"\"",(cfg.logs),"
\
" "
,\
"\"",(cfg.session),"
\
" "
,\
"\"",(cfg.watch),"
/
load
\
" "
,\
"\"",(cfg.watch),"
/
start
\
" "
)
## Listening port for incoming peer traffic (fixed; you can also randomize it)
# Listening port for incoming peer traffic
network
.
port_range
.
set
=
50000
-
50000
network
.
port_random
.
set
=
no
## Tracker-less torrent and UDP tracker support
## (conservative settings for 'private' trackers, change for 'public')
dht
.
mode
.
set
= (
system
.
env
,
RT_DHT_MODE
)
#dht.port.set = (system.env,RT_DHT_PORT)
protocol
.
pex
.
set
= (
system
.
env
,
RT_PROTO_PEX
)
# Distributed Hash Table and Peer EXchange
# Enable tracker-less torrents but vulnerable to passive sniffing
# DHT and PEX are always disabled for private torrents
dht
.
mode
.
set
=
disable
protocol
.
pex
.
set
=
no
trackers
.
use_udp
.
set
= (
system
.
env
,
RT_TRACKER_UDP
)
## Peer settings
# Peer settings
throttle
.
max_uploads
.
set
= (
system
.
env
,
RT_MAX_UP
)
throttle
.
max_uploads
.
global
.
set
= (
system
.
env
,
RT_MAX_UP_GLOBAL
)
throttle
.
min_peers
.
normal
.
set
= (
system
.
env
,
RT_MIN_PEERS
)
...
...
@@ -51,74 +31,50 @@ trackers.numwant.set = (system.env,RT_TRACKERS_WANT)
protocol
.
encryption
.
set
=
allow_incoming
,
try_outgoing
,
enable_retry
## Limits for file handle resources, this is optimized for
## an `ulimit` of 1024 (a common default). You MUST leave
## a ceiling of handles reserved for rTorrent's internal needs!
# Limits for file handle resources, this is optimized for
# an `ulimit` of 1024 (a common default). You MUST leave
# a ceiling of handles reserved for rTorrent's internal needs!
network
.
http
.
max_open
.
set
=
50
network
.
max_open_files
.
set
=
600
network
.
max_open_sockets
.
set
=
300
## Memory resource usage (increase if you have a large number of items loaded,
## and/or the available resources to spend)
# Memory resource usage (increase if you have a large number of items loaded,
# and/or the available resources to spend)
pieces
.
memory
.
max
.
set
= (
system
.
env
,
RT_MEMORY_MAX
)
network
.
xmlrpc
.
size_limit
.
set
=
4
M
network
.
xmlrpc
.
size_limit
.
set
=
16
M
#
# Basic operational settings
(no need to change these)
# Basic operational settings
session
.
path
.
set
= (
cat
, (
cfg
.
session
))
directory
.
default
.
set
= (
cat
, (
cfg
.
download
))
log
.
execute
= (
cat
, (
cfg
.
logs
),
"execute.log"
)
#log.xmlrpc = (cat, (cfg.logs), "xmlrpc.log")
execute
.
nothrow
=
sh
, -
c
, (
cat
,
"echo >"
,\
(
session
.
path
),
"rtorrent.pid"
,
" "
,(
system
.
pid
))
log
.
execute
= (
cat
, (
cfg
.
tmp
),
"execute.log"
)
##log.xmlrpc = (cat, (cfg.tmp), "xmlrpc.log")
## Other operational settings (check & adapt)
# Other operational settings
encoding
.
add
=
utf8
system
.
umask
.
set
=
0027
system
.
cwd
.
set
= (
directory
.
default
)
network
.
http
.
dns_cache_timeout
.
set
=
25
schedule2
=
monitor_diskspace
,
15
,
60
, ((
close_low_diskspace
,
1000
M
))
#pieces.hash.on_completion.set = no
#view.sort_current = seeding, greater=d.ratio=
#keys.layout.set = qwerty
#network.http.capath.set = "/etc/ssl/certs"
#network.http.ssl_verify_peer.set = 0
#network.http.ssl_verify_host.set = 0
## Some additional values and commands
method
.
insert
=
system
.
startup_time
,
value
|
const
, (
system
.
time
)
method
.
insert
=
d
.
data_path
,
simple
,\
"
if
=(
d
.
is_multi_file
),\
(
cat
, (
d
.
directory
), /),\
(
cat
, (
d
.
directory
), /, (
d
.
name
))
"
method
.
insert
=
d
.
session_file
,
simple
,
"cat=(session.path), (d.hash), .torrent"
##view.sort_current = seeding, greater=d.ratio=
##keys.layout.set = qwerty
# HTTP and SSL
network
.
http
.
max_open
.
set
=
50
network
.
http
.
dns_cache_timeout
.
set
=
25
## Watch directories (add more as you like, but use unique schedule names)
## Add torrent
schedule2
=
watch_load
,
11
,
10
, ((
load
.
verbose
, (
cat
, (
cfg
.
watch
),
"load/*.torrent"
)))
## Add & download straight away
schedule2
=
watch_start
,
10
,
10
, ((
load
.
start_verbose
, (
cat
, (
cfg
.
watch
),
"start/*.torrent"
)))
#network.http.ssl_verify_peer.set = 1
#network.http.ssl_verify_host.set = 1
## Run the rTorrent process as a daemon in the background
## (and control via XMLRPC sockets)
system
.
daemon
.
set
= (
system
.
env
,
RT_DAEMON
)
network
.
scgi
.
open_port
= (
cat
,(
system
.
env
,
RT_XMLRPC_BIND
),:,(
system
.
env
,
RT_XMLRPC_PORT
))
#network.scgi.open_local = (cat,(session.path),rpc.socket)
#execute.nothrow = chmod,770,(cat,(session.path),rpc.socket)
# Run the rTorrent process as a daemon in the background
system
.
daemon
.
set
=
true
# XML-RPC interface
network
.
scgi
.
open_port
=
0
.
0
.
0
.
0
:
5000
#
# Logging:
#
# Levels = critical error warn notice info debug
#
# Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_*
# Logging:
# Levels = critical error warn notice info debug
# Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_*
print
= (
cat
,
"Logging to "
, (
cfg
.
logfile
))
log
.
open_file
=
"log"
, (
cfg
.
logfile
)
log
.
add_output
=
"info"
,
"log"
#log.add_output = "tracker_debug", "log"
### END of rtorrent.rc ###
##log.add_output = "tracker_debug", "log"
This diff is collapsed.
Click to expand it.
wireguard/entrypoint.sh
+
12
−
1
View file @
9405fc9a
#!/bin/bash
set
-euo
pipefail
wg-quick up
"/wireguard.conf"
if
[
-n
"
$LOCAL_NETWORK
"
]
;
then
gateway
=
$(
ip route list match 0.0.0.0 |
grep
-v
tun0 |
cut
-d
' '
-f
3
)
interface
=
$(
ip route list match 0.0.0.0 |
grep
-v
tun0 |
cut
-d
' '
-f
5
)
echo
gateway
=
"
$gateway
"
echo
interface
=
"
$interface
"
fi
wg-quick up /wireguard.conf
if
[
-n
"
$LOCAL_NETWORK
"
]
;
then
ip r add
"
$LOCAL_NETWORK
"
via
"
${
gateway
}
"
dev
"
${
interface
}
"
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment