AttachTorrent

Purpose

AttachTorrent action plugin allows your wiki to become a torrent site. It provides integration with XBT Tracker - Bit Torrent protocol tracker program. You can make a catalog of torrent files on you wiki.

AttachTorrent action is designed with privacy in mind. It registers torrent files and wiki users in XBT Tracker database, writes private announce URL for each user downloading torrent file to enable authentication on tracker, optionally adds Private flag to turn off broadcast DHT, PEX, LSD protocols.

Install

  1. Install and configure XBT Tracker somewhere. The plugin only needs to access to XBT Tracker MySQL database.
    The plugin is designed to work with XBT Tracker configured as: anonymous_announce = 0 and auto_register = 0

  2. The plugin depends on the following libraries. You should make them importable from your wiki Python environment.
    1. easy_install BitTorrent-bencode This is a library to parse and work with .torrent files

    2. easy_install pymysql This is a DB-API 2.0 library to work with XBT Tracker database

  3. Download AttachTorrent.py and put it to your wiki/data/plugin/action directory as usual.

  4. Add the following options to your wiki configuration:

   1     # Activate AttachTorrent action for *.torrent attachments
   2     extensions_mapping = {
   3         '.torrent': {
   4                     'get': 'AttachTorrent',
   5                     'del': 'AttachTorrent',
   6         },
   7         # preserve default values:
   8         '.tdraw': {'modify': 'twikidraw'},
   9         '.adraw': {'modify': 'anywikidraw'},
  10     }
  11 
  12     # Connection parameters to XBT Tracker database
  13     xbt_mysqldb = {
  14         'host': 'myhost',
  15         'user': "myuser",
  16         'passwd': 'mypassword',
  17         'db': "mydb",
  18     }
  19 
  20     # This will be a host:port part of announce URLs written to .torrent files
  21     xbt_host = 'your.xbt.host:2710'
  22 
  23     # Force setting of Private flag = Yes to all .torrent files
  24     xbt_force_private = True
  25 
  26     # Exclude AttachTorrent action from user action list as we don't need it
  27     actions_excluded = ['AttachTorrent', ...]

Usage

The plugin is designed to work transparently for users: an author user should just attach a new torrent file to a page and download it back to start seeding. Then all others who are allowed to view the page can download the attached torrent file and go on.

AlexeyLosev

ToDo

Discussion

Please feel free to write your feedback.

MoinMoin: ActionMarket/AttachTorrent (last edited 2013-04-03 07:06:41 by AlexeyLosev)