• S'enregistrer
  • Login
  • Forum   
  • Malice Fansub
    Visite guidée Projets futurs Dramas Films & SP Animes Clips + TV + Bonus Avancement La team Nous rejoindre Nous contacter
  • Sub'friends
    Byaoiline Drama Jinso Fansub Hana Miyabi Fansub Kumo no Toile Mangas-Arigatou Fansub misterdred Miyou Fansub Niwatori Subs The king Sejong
  • Médiathèque
    J-Dramas J-Films/SP Anime OST J-Dramas OST Films OST Animes
  • S'enregistrer
  • Login
  • Home
  • Members
  • Help
  • Search
Otarigato Machine à café Informatique Seedbox pas à pas debian

Messages globaux
Dernière niouze
Nouveaux messages

Derniers messages
Scannernnu
start to write on the key...

Dernier : Scannernnu
Il y a 10 heures
Forum : Miouzique
0 - 16
Tchenss
Votre musique du moment ?

Dernier : Tchenss
Hier, 18:07
Forum : Miouzique
188 - 171,421
umi-chan
K-pop & K-Rock

Dernier : umi-chan
12-05-2025, 14:09
Forum : Miouzique
449 - 297,785
Ronaldepilm
[The defeat IT solutions ...

Dernier : Ronaldepilm
12-05-2025, 00:15
Forum : Votre présentation
0 - 66
jonomesa
King's daughter Soo Baek ...

Dernier : jonomesa
01-05-2025, 19:57
Forum : Dramas
292 - 30,745
CatherineClaire
Kieta hatsukoi (My love m...

Dernier : CatherineClaire
01-05-2025, 05:25
Forum : Dramas
68 - 1,072
umi-chan
Thaï Pop, Rock, etc

Dernier : umi-chan
25-04-2025, 16:38
Forum : Miouzique
10 - 4,884
alexavignon
Fūrin kazan

Dernier : alexavignon
23-04-2025, 19:45
Forum : J-Dramas
6 - 8,967
Yami Shino
Saiki Kusuo no Ψ nan (The...

Dernier : Yami Shino
22-04-2025, 01:20
Forum : J-Films & SP
14 - 4,699
Shingo425
Jikō keisatsu hajimemashi...

Dernier : Shingo425
13-04-2025, 12:52
Forum : J-Dramas
3 - 5,187

Utilisateurs en ligne
Bing, Google
Total : 243 (0 Membre(s) | 241 Visiteur(s))

Statistiques du Forum
Sujets du forum : 4458
Messages du forum : 33239
Membres : 1966
Dernier membre : Scannernnu
Seedbox pas à pas debian
 
  • Moyenne : 0 (0 vote(s))
Description du topic
debian 10 + rtorrent + rutorrent + vpn
Kirinenko (Hors ligne)

Grumeau des Alpes
Otarie Team
Sub’friends
Arrivée : Oct 2011
Sujets : 334
Messages : 4,252
J'aime reçus : 493
#3
15-12-2020, 21:21 (Modification du message : 15-12-2020, 21:37 par Kirinenko.)
Installation du client torrent et son interface

rtorrent

On va ajouter un utilisateur rtorrent avec son dossier home (/home/rtorrent)
Code :
sudo adduser --disabled-login --disabled-password --home /home/rtorrent --system --group rtorrent

On peut lire dans le wiki (https://github.com/rakshasa/rtorrent/wiki)
The rTorrent bittorrent client uses ncurses and is ideal for use with tmux, screen or dtach. Alternatively, version 0.9.7+ has a built-in daemon mode disabling the user interface, so you can only control it via XMLRPC. It supports saving of sessions, allows the user to add/remove torrents, and much more.

La dernière version stable offerte est :
  • http://rtorrent.net/downloads/libtorrent-0.13.6.tar.gz
  • http://rtorrent.net/downloads/rtorrent-0.9.6.tar.gz

et la dernière version en dev
  • http://rtorrent.net/downloads/libtorrent-0.13.8.tar.gz
  • http://rtorrent.net/downloads/rtorrent-0.9.8.tar.gz

Sur la machine, si on lance les commandes :
Code :
sudo apt-get update
sudo apt-cache policy rtorrent

On obtient :
rtorrent:
Installed: (none)
Candidate: 0.9.7-1
Version table:
0.9.7-1 500
Donc la version de rtorrent disponible par les paquets est la 0.9.7-1.

Sur la machine, si on lance la commande :
Code :
sudo apt-cache depends rtorrent

On obtient :
rtorrent
Depends: libc6
Depends: libcppunit-1.14-0
Depends: libcurl4
Depends: libgcc1
Depends: libncursesw6
Depends: libstdc++6
Depends: libtinfo6
Depends: libtorrent20
Depends: libxmlrpc-core-c3
|Suggests: screen
Suggests: dtach

On installe rtorrent :
Code :
sudo apt install rtorrent
Normalement donc libtorrent20 et libxmlrpc-core-c3 sont installés aussi.

On crée les dossiers pour rtorrent :
Code :
sudo mkdir -p /home/rtorrent/{session,watch,download}
sudo chmod 775 -R /home/rtorrent/{session,watch,download}
sudo chown rtorrent:rtorrent -R /home/rtorrent/{session,watch,download}

On ajoute un fichier de config pour rtorrent :
Code :
sudo nano /home/rtorrent/.rtorrent.rc
Dedans, on copie :
# Port SCGI
scgi_port = 127.0.0.1:5000

# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.

# Maximum and minimum number of peers to connect to per torrent.
#
throttle.min_peers.normal.set = 40
throttle.max_peers.normal.set = 100

# Same as above but for seeding completed torrents (-1 = same as downloading)
#
throttle.min_peers.seed.set = 10
throttle.max_peers.seed.set = 100

# Maximum number of simultanious uploads per torrent.
#
throttle.max_uploads.set = 15

# Global upload and download rate in KiB. "0" for unlimited.
#
throttle.global_down.max_rate.set_kb = 0
throttle.global_up.max_rate.set_kb = 0

# Default directory to save the downloaded torrents.
#
directory.default.set = /home/rtorrent/download

# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
#
session.path.set = /home/rtorrent/session

# Watch a directory for new torrents, and stop those that have been
# deleted.
#
schedule2 = watch_directory,5,5,load_start=/home/rtorrent/session/*.torrent
schedule2 = untied_directory,5,5,stop_untied=

# Close torrents when diskspace is low.
#
schedule2 = low_diskspace,5,60,close_low_diskspace=2000M

# The ip address reported to the tracker.
#
#network.local_address.set = 127.0.0.1
#network.local_address.set = rakshasa.no

# The ip address the listening socket and outgoing connections is
# bound to.
#
#network.bind_address.set = 127.0.0.1
#network.bind_address.set = rakshasa.no

# Port range to use for listening.
#
network.port_range.set = 60006-60006

# Start opening ports at a random position within the port range.
#
network.port_random.set = no

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
#
pieces.hash.on_completion.set = no

# Set whether the client should try to connect to UDP trackers.
#
trackers.use_udp.set = yes

# Alternative calls to bind and ip that should handle dynamic ip's.
#
#schedule2 = ip_tick,0,1800,ip=rakshasa
#schedule2 = bind_tick,0,1800,bind=rakshasa

# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
protocol.encryption.set = allow_incoming,enable_retry,prefer_plaintext
#protocol.encryption.set = require,require_RC4

# Enable DHT support for trackerless torrents or when all trackers are down.
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
#
dht.mode.set = auto

# UDP port to use for DHT.
#
dht.port.set = 60007

# Enable peer exchange (for torrents not marked private)
#
protocol.pex.set = yes

# Set downlad list layout style. ("full", "compact")
#
#ui.torrent_list.layout.set = "full"

Puis on fait :
Code :
sudo chown rtorrent:rtorrent /home/rtorrent/.rtorrent.rc
sudo chmod 775 /home/rtorrent/.rtorrent.rc
On a un fichier de config .rtorrent.rc
Source pour le session : https://github.com/rakshasa/rtorrent/wiki/Using-DHT

Note : Les liens magnets peuvent ne pas fonctionner si le chiffrement n'est pas activé :
Il faut mettre alors :
Code :
protocol.encryption.set = require,require_RC4
Source : https://rtorrent-docs.readthedocs.io/en/...yption-set

On va ouvrir ces ports dans iptables :
Code :
sudo nano /etc/init.d/iptablesrules

Et avant la dernière ligne, on ajoute :
#Autorisation p2p
iptables -t filter -A INPUT -p tcp --dport 60006 -j ACCEPT
iptables -t filter -A INPUT -p udp --dport 60007 -j ACCEPT

rutorrent

On l'installe via git :
Code :
sudo git clone https://github.com/Novik/ruTorrent.git /var/www/rutorrent/
sudo chown -R www-data:www-data /var/www/rutorrent

On édite la config de rutorrent pour refléter le fichier de téléchargement de l'utilisateur rtorrent :
Code :
sudo nano /var/www/rutorrent/conf/config.php

On modifie la ligne :
$topDirectory = '/home/rtorrent/download'; // Upper available directory. Absolute path with trail slash.

Vous pouvez aussi vérifier quelques chemins avec la commande "whereis", example :
Code :
whereis curl
qui donne :
curl: /usr/bin/curl /usr/share/man/man1/curl.1.gz
On ne prends que le premier chemin à chaque fois.

Dans le même fichier (config.php) on peut donc modifier la partie suivante avec les infos obtenus via "curl":
$pathToExternals = array(
"php" => '/usr/bin/php', // Something like /usr/bin/php. If empty, will be found in PATH.
"curl" => '/usr/bin/curl', // Something like /usr/bin/curl. If empty, will be found in PATH.
"gzip" => '/usr/bin/gzip', // Something like /usr/bin/gzip. If empty, will be found in PATH.
"id" => '/usr/bin/id', // Something like /usr/bin/id. If empty, will be found in PATH.
"stat" => '/usr/bin/stat', // Something like /usr/bin/stat. If empty, will be found in PATH.
);

On essaie d'installer la reconnaissance du pays via l'ip
Sources : https://stackoverflow.com/questions/5409...-trying-to (archive : https://archive.vn/69rhe)
https://github.com/Novik/ruTorrent/issue...-207016405(archive : https://archive.vn/6QIcS)

Code :
sudo apt install geoip-database

Pour sécuriser l'accès à l'interface web, on crée un utilisateur avec son mot de passe pour y accéder :
Code :
cd /var/www/rutorrent
sudo htpasswd -c /var/www/rutorrent/.htpasswd utilisateur_rtorrent-web

On édite le .htaccess de rutorrent :
Code :
sudo nano /var/www/rutorrent/.htaccess

Et on ajoute :
AuthUserFile /var/www/rutorrent/.htpasswd
AuthName "Acceder à la source :"
AuthType Basic
require valid-user

A la page : https://github.com/Novik/ruTorrent/wiki/WebSERVER
On peut lire :
Also, a note on authentication. If you are password protecting your ruTorrent directory, make sure to set your SCGI mount point under that directory, or provide authentication for it as well.
Donc faudra bien mettre ça en place du coup.

On crée la conf d'apache pour mettre en place rutorrent :
Code :
sudo nano /etc/apache2/sites-available/rutorrent.conf

On ajoute :
# ruTorrent
#===============================
<IfModule alias_module>

Alias /rutorrent /var/www/rutorrent/

<Directory /var/www/rutorrent/>
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>

</IfModule>
#===============================

On active l'interface web de rutorrent :
Code :
sudo ln -s /etc/apache2/sites-available/rutorrent.conf /etc/apache2/sites-enabled/rutorrent.conf

On active certains modules d'apache :
Code :
sudo a2enmod auth_digest
sudo a2enmod authn_file
sudo a2enmod xsendfile
sudo a2enmod scgi

On va sécuriser le dossier scgi(/rpc2), pour cela on commence par créer un répertoire pour avoir des mots de passes pour apache2 :
Code :
sudo mkdir -p /etc/apache2/passwords-{available,enabled}

On va dans le dossier des mots de passe disponibles et on en crée un pour un utilisateur :
Code :
cd /etc/apache2/passwords-available
sudo htpasswd -c rtorrentscgi scgi_utilisateur
Vous mettez n'importe quel mot de passe.

On fait le lien entre le fichier crée et la partie active :
Code :
sudo ln -s /etc/apache2/passwords-available/rtorrentscgi /etc/apache2/passwords-enabled/rtorrentscgi

On édite le fichier de conf pour scgi de rutorrent :
Code :
sudo nano /etc/apache2/sites-available/rtorrentscgi.conf

On ajoute cela :
#rTorrent SCGI Password Location
#===============================
<LocationMatch "/RPC2">
AuthType Basic
AuthName "scgi_utilisateur"
AuthUserFile /etc/apache2/passwords-enabled/rtorrentscgi
Require valid-user
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
Require ip 127.0.0.1
</LocationMatch>
#===============================

# SCGI PORT
#===============================

#LoadModule scgi_module /usr/lib/apache2/modules/mod_scgi.so
SCGIMount /RPC2 127.0.0.1:5000

#===============================

On active cette config :
Code :
sudo ln -s /etc/apache2/sites-available/rtorrentscgi.conf /etc/apache2/sites-enabled/rtorrentscgi.conf

On redémare apache :
Code :
sudo systemctl restart apache2

Note : vous pouvez avoir le message d'erreur suivant :
Failed to restart apache2.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files See system logs and 'systemctl status apache2.service' for details.

Il nous manque un paquet :
Code :
sudo apt install policykit-1

On fini par mettre en place le démarrage de rtorrent avec la machine à l'aide de systemd :
Code :
sudo nano /etc/systemd/system/rtorrent.service

Dedans, on mets :
[Unit]
Description=rTorrent
After=network.target

[Service]
UMask=002
Type=forking
RemainAfterExit=yes
KillMode=none
User=rtorrent
ExecStartPre=-/bin/rm -f /home/rtorrent/session/rtorrent.lock
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent
WorkingDirectory=/home/rtorrent/

[Install]
WantedBy=multi-user.target

On active cela :
/!\ Cela lance rtorrent au démarrage de la machine /!\
Code :
sudo systemctl enable rtorrent.service

Pour désactiver :
Code :
sudo systemctl disable rtorrent.service

On pourra utiliser les commandes suivantes :
Code :
sudo systemctl start rtorrent
sudo systemctl stop rtorrent
sudo systemctl restart rtorrent

On démarre le tout :
Code :
sudo systemctl start rtorrent

Pouvez alors voir que ça fonctionne bien avec la commande :
Code :
sudo netstat -npl | grep rtorrent
Vous avez accès à l'interface web via l'url "https://ip.de.la.machine/rutorrent/" et en utilisant le compte créé.

Il faut redemarrer apache :
Code :
systemctl restart apache2

On peut avoir une erreur avec le plugin _cloudfare
On va simplement virer le dossier du plugin de rutorrent :
Code :
sudo service rtorrent stop
sudo mv /var/www/rutorrent/plugins/_cloudflare /home/rtorrent/
sudo service rtorrent start
Kirinenko a écrit :Je m'autoquote si je veux, d'abord.
Nyanyanyanyan . . . . . . . . . . . . . . . [Image: chat-moche-27c1d17.gif]
[Image: 4yi3an10-3858b7.gif]
Répondre

  •
 J'aime Citer
  Nouvelle réponse
« Sujet précédent | Sujet suivant »

Utilisateur(s) parcourant ce sujet : 1 visiteur(s)



Messages dans ce sujet
Seedbox pas à pas debian - par Kirinenko - 15-12-2020, 21:19
RE: Réservé - par Kirinenko - 15-12-2020, 21:21
RE: Réservé - par Kirinenko - 15-12-2020, 21:21
RE: Réservé - par Kirinenko - 15-12-2020, 21:21
RE: Réservé - par Kirinenko - 15-12-2020, 21:21
RE: Seedbox pas à pas debian - par Tchenss - 16-12-2020, 17:30
RE: Seedbox pas à pas debian - par Kirinenko - 16-12-2020, 17:47
RE: Seedbox pas à pas debian - par Tchenss - 16-12-2020, 18:01

  • S’abonner au sujet
  Discord

Malice Fansub
Avat6
Avancement
Fiche Dogaru
Page Facebook

Dernières sorties
La team est désormais fermée.

Todome no kiss
Todome no parallel
Épisodes 8 à 10 FIN
Todome

Kieta hatsukoi - SP
Kieta

Bokura wa koi
Ep 7 FIN
BokuraW

Tokyo revengers
LICENCIÉ
TokyoR

Mogura no uta
v2 - 1080p
Mogura

Mogura no uta 2
Mogura2

Sakamichi no Apollon
Sakamichi


Partenaires
partenaire logo

Choisissez Firefox
obtenir firefox

© Propulsé par MyBB et basé sur un design de D&D

Contact
Affichage linéaire
Affichage hiérarchique