wiki:TipAndDoc/network/BitTorrent

Version 10 (modified by mitty, 11 years ago) (diff)

--

  • TorrentFlux:サーバーで動かすBitTorrentクライアント - SourceForge.JP Magazine : オープンソースの話題満載

    TorrentFlux は、Apache、MySQL、PHPが動作しているサーバー上で動くBitTorrentクライアントだ。ほぼすべての操作をWebブラウザー上で行うよう実装されており、これにより従来のAzureusのようなクライアントにはない機能性を実現している。バックグラウンドにはBitTornadoクライアントがいて、キュー、ダウンロード、トレント・ファイルのシードを管理する。TorrentFluxを自分のマシン上で動かし、Webサーバー上のフォルダーの形でアクセスするという使い方ができる。また、帯域幅と転送速度を改善するために外部のホストにインストールすることもできる。

    • 完了したファイルを別の場所に移動する(未完了と完了をディレクトリで分けておく)機能がない
    • 日本語が正常に扱えない(ファイル名が文字化けする)
    • TorrentFluxについては99%病が起きやすい模様 (github:epsylon3/torrentflux 5defc7a64c では特に起きず)

deluge

  • mitty@torrent:~$ sudo aptitude install -R deluged deluge-webui
    Version: 1.3.5-0ubuntu2~precise2
    
  • mitty@torrent:~$ sudo adduser --system --group --home /var/lib/deluge deluge
    • daemonとして稼働させるための専用アカウント
  • mitty@torrent:~$ sudo mkdir -p /var/log/deluge
  • mitty@torrent:~$ sudo chown -R deluge:deluge /var/log/deluge
  • mitty@torrent:~$ sudo vim /etc/init/deluged.conf
    start on (filesystem and networking) or runlevel [2345]
    stop on runlevel [016]
    
    env uid=deluge
    env gid=deluge
    env umask=022
    
    exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d -l /var/log/deluge/daemon.log -L warning
    
  • mitty@torrent:~$ sudo vim /etc/init/deluge-web.conf
    start on started deluged
    stop on stopping deluged
    
    env uid=deluge
    env gid=deluge
    env umask=027
    
    exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web -- -l /var/log/deluge/web.log -L warning
    

日本語ファイル名.torrent

  • daemon.log
    [ERROR   ] 21:50:58 autoadd:80 Unable to auto add torrent due to improper filename encoding: 'ascii' codec can't decode byte 0xe3 in position 1: ordinal not in range(128)
    
    • ファイル名にMBCSが含まれるtorrentファイルは追加できない模様(MBCS自体は扱えるので、torrentファイルを適宜renameすれば良い)

screen shot

    • 未完了のファイルに.!qBなどの拡張子をつける機能はない、代わりに完了時にディレクトリを移す機能は存在する

qbittorrent

  • mitty@torrent:~$ sudo aptitude install -R qbittorrent-nox
    Version: 2.9.7-1
    
  • ファイル名にMBCSが含まれるtorrentファイルも問題なく扱える模様
  • qbittorrent-nox コマンドによって、フォアグランドで動作
    Usage:
            qbittorrent-nox --version: displays program version
            qbittorrent-nox --help: displays this help message
            qbittorrent-nox --webui-port=x: changes the webui port (current: 8080)
            qbittorrent-nox [files or urls]: downloads the torrents passed by the user (optional)
    
  • 実行時ログはコンソールへ出力される
    Peer ID: -qB2970-
    HTTP user agent is qBittorrent v2.9.7
    
    ******** Information ********
    To control qBittorrent, access the Web UI at http://localhost:8080
    The Web UI administrator user name is: admin
    The Web UI administrator password is still the default one: adminadmin
    This is a security risk, please consider changing your password from program preferences.
    30/12/2012 02:51:56 - The Web UI is listening on port 8080
    
  • 設定ファイルは~/.cache/, ~/.config/, ~/.local/に分散して保存される

screen shot

    • 未完了のファイルに拡張子.!qBをつけることが可能
    • 転送完了時には、未完了のTorrentの格納先 -> ファイルの保存先 と移動される

utorrent

  • webUIはGUI版とほぼ同じ操作性
  • Init Script for Debian/Ubuntu & Derivatives (Page 1) / General (Linux) / µTorrent Community Forums

    Here's an upstart script for you guys:

    # It is highly recommended that you run this under a user account and not as root
    # The LOGFILE must also be set to a directory writable by the user account
    
    # Path to the utorrent server
    env UTORRENT_PATH=/path/to/utorrent
    
    # Location of the log file (must be by the current user writable)
    env LOGFILE=/path/to/utorrent/utserver.log
    
    # Path of pid file
    env PIDFILE=/path/to/utorrent/utserver.pid
    
    # Name of the utorrent server binary (you usually don't need to change this)
    env EXEC=utserver
    
    # set account and umask executes utorrent server
    setuid utorrent
    umask 022
    
    # Nice value you can comment this out if don't want to run at a lower priority
    nice 15
    
    kill timeout 30
    kill signal INT
    
    start on (local-filesystems and net-device-up IFACE=eth0)
    stop on runlevel [016]
    
    # It is highly recommended that you don't run as the root user you will need
    # to change this line to have your own user account for example:
    #
    # exec su <your user account> -c <utorrent command>
    
    script
    	test -f /etc/default/locale && . /etc/default/locale
    	export LANG
    	$UTORRENT_PATH/$EXEC -settingspath $UTORRENT_PATH -logfile $LOGFILE \
    		-pidfile $PIDFILE
    end script
    
    post-stop script
    	rm -f $PIDFILE
    end script
    
    • localeの設定がないと、日本語ファイル名の.torrentを読み込めない

Attachments (5)

Download all attachments as: .zip