+++ /dev/null
-<table class="table table-striped">
- <thead>
- <tr>
- <th> </th>
- <th>Hostname</th>
- </tr>
- </thead>
- <tbody>
- {% for peer in peers %}
- <tr>
- <td>
- <img src="{{ static_url("images/flags/" + peer.country_code + ".png") }}"
- alt="{{ peer.country_code }}" />
- {{ peer.ip }}
- </td>
- <td>{{ peer.hostname or "---" }}</td>
- </tr>
- {% end %}
- </tbody>
-</table>
+++ /dev/null
-{% extends "base-1.html" %}
-
-{% block title %}{{ file.basename }} - {{ release.name }} - {{ _("Torrent download") }}{% end block %}
-
-{% block body %}
- <div class="page-header">
- <h1>
- {{ file.basename }}
- <small>{{ release.name }}</small>
- </h1>
- </div>
-
- <p class="pull-right">
- <a class="btn btn-default" href="{{ file.magnet_link }}">
- <i class="glyphicon glyphicon-magnet"></i> {{ _("Magnet link") }}
- </a>
- <a class="btn btn-default" href="http://tracker.ipfire.org/{{ file.torrent_hash }}/download">
- <i class="glyphicon glyphicon-download-alt"></i> {{ _("Torrent download") }}
- </a>
- </p>
-
- {% if peers %}
- <h3>{{ _("Peers & Seeds") }}</h3>
- {% module TrackerPeerList(peers) %}
- {% end %}
-{% end block %}
+++ /dev/null
-{% extends "base-1.html" %}
-
-{% block title %}{{ _("Torrent Downloads") }}{% end block %}
-
-{% block body %}
- <div class="page-header">
- <h1>{{ _("IPFire Torrent Tracker") }}</h1>
- </div>
-
- {% if lang == "de" %}
- <p>
- Dies ist der IPFire Torrent Tracker.
- </p>
- <p>
- Er wird für das verteilen der IPFire-Downloads gebraucht
- und tut das effizient mit Hilfe des Bittorrent-Protokols.
- </p>
- {% else %}
- <p>
- This is the home of the IPFire torrent tracker.
- </p>
- <p>
- This tracker is used to distribute the IPFire
- downloads in an efficient way with help of the Bittorrent
- protocol.
- </p>
- {% end %}
-
- <table class="table table-striped">
- <thead>
- <tr>
- <th>{{ _("Release") }}</th>
- <th>{{ _("Seeders") }}</th>
- <th>{{ _("Peers") }}</th>
- <th> </th>
- </tr>
- </thead>
- <tbody>
- {% for release in releases %}
- <tr>
- <td colspan="4">
- <h3>{{ release.name }}</h3>
- </td>
- </tr>
-
- {% for torrent in release.torrents %}
- <tr>
- <td>
- <a href="/{{ torrent.torrent_hash }}">{{ torrent.basename }}</a>
- </td>
- <td>
- {{ torrent.seeders }}
- </td>
- <td>
- {{ torrent.peers }}
- </td>
- <td>
- <a href="{{ torrent.magnet_link }}">
- <i class="glyphicon glyphicon-magnet"></i>
- </a>
- <a href="http://tracker.ipfire.org/{{ torrent.torrent_hash }}/download">
- <i class="glyphicon glyphicon-download-alt"></i>
- </a>
- </td>
- </tr>
- {% end %}
- {% end %}
- </tbody>
- </table>
-{% end block %}
"TalkCallLog" : TalkCallLogModule,
"TalkLines" : TalkLinesModule,
"TalkOngoingCalls" : TalkOngoingCallsModule,
- "TrackerPeerList" : TrackerPeerListModule,
"Wish" : WishModule,
"Wishlist" : WishlistModule,
"WishlistItems" : WishlistItemsModule,
(r"/profile/([a-f0-9]{40})/([0-9]+).png", IUseImage),
])
- # tracker.ipfire.org
- self.add_handlers(r"(torrent|tracker)(\.dev)?\.ipfire\.org", [
- (r"/", TrackerIndexHandler),
- (r"/announce.*", TrackerAnnounceHandler),
- (r"/scrape", TrackerScrapeHandler),
- (r"/torrent/([0-9a-f]+)", TrackerDetailHandler),
- (r"/([0-9a-f]{40})", TrackerDetailHandler),
- (r"/([0-9a-f]{40})/download", TrackerDownloadHandler),
- ] + static_handlers)
-
# boot.ipfire.org
BOOT_STATIC_PATH = os.path.join(self.settings["static_path"], "netboot")
self.add_handlers(r"boot(\.dev)?\.ipfire\.org", [
account=account, channels=channels, debug=debug)
-class TrackerPeerListModule(UIModule):
- def render(self, peers):
- # Guess country code and hostname of the host
- for peer in peers:
- country_code = self.geoip.get_country(peer["ip"])
- if country_code:
- peer["country_code"] = country_code.lower()
- else:
- peer["country_code"] = "unknown"
-
- try:
- peer["hostname"] = socket.gethostbyaddr(peer["ip"])[0]
- except:
- peer["hostname"] = ""
-
- return self.render_string("modules/tracker-peerlist.html",
- peers=[backend.database.Row(p) for p in peers])
-
-
class WishlistModule(UIModule):
def render(self, wishes, short=False):
return self.render_string("wishlist/modules/wishlist.html",