summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2021-12-30 16:25:13 -0700
committerJordan <me@jordan.im>2021-12-30 16:25:13 -0700
commit06c8cf3b1e0c2a6d9057a1ebe8e2d566b4f3196a (patch)
treed758f6499d7d6a930ed0ca5a91277d61bf92ab3e
downloadwww-06c8cf3b1e0c2a6d9057a1ebe8e2d566b4f3196a.tar.gz
www-06c8cf3b1e0c2a6d9057a1ebe8e2d566b4f3196a.zip
initial commit
-rw-r--r--jordan.im/Makefile14
-rw-r--r--jordan.im/index.744
-rw-r--r--jordan.im/style.css22
-rw-r--r--tracker.jordan.im/Makefile14
-rw-r--r--tracker.jordan.im/index.727
-rw-r--r--tracker.jordan.im/style.css22
-rwxr-xr-xtracker.jordan.im/update-stats.py36
7 files changed, 179 insertions, 0 deletions
diff --git a/jordan.im/Makefile b/jordan.im/Makefile
new file mode 100644
index 0000000..d85e990
--- /dev/null
+++ b/jordan.im/Makefile
@@ -0,0 +1,14 @@
+WEBROOT = /var/www/jordan.im
+
+FILES = index.html style.css
+
+all: ${FILES}
+
+index.html: index.7
+ mandoc -T html -O style=style.css index.7 > index.html
+
+install: ${FILES}
+ install -c -m 644 ${FILES} ${WEBROOT}
+
+clean:
+ rm -f index.html
diff --git a/jordan.im/index.7 b/jordan.im/index.7
new file mode 100644
index 0000000..18bf527
--- /dev/null
+++ b/jordan.im/index.7
@@ -0,0 +1,44 @@
+.Dd December 30, 2021
+.Dt JORDAN.IM 7
+.Os "OpenBSD / Alpine Linux"
+.
+.Sh NAME
+.Nm jordan
+.Nd software engineer, tinkerer
+.
+.Sh SYNOPSIS
+.Nm mail
+.Mt me@jordan.im Lk https://jordan.im/jordan.im-pub.asc 0x3702FBE9EA0CFAE0
+.
+.Nm dove
+on libera.chat
+.
+.Sh DESCRIPTION
+I write software related to research literature, censorship, and data archival.
+.
+.Pp
+.
+.Pp
+.Bl -tag -width Ds
+.It Lk https://git.jordan.im/crane/ crane
+Research literature download and categorization web service
+.It Lk https://git.jordan.im/keep/ keep
+Discord self-bot which archives URLs on the Wayback Machine
+.It Lk https://git.jordan.im/roka/ roka
+Listen to audiobooks with podcast apps
+.It Lk https://git.jordan.im/allium/ allium
+Statically-generated tor relay metrics and statistics
+.It Lk https://git.jordan.im/ft-bypass/ ft-bypass
+Transparent proxy and paywall bypass for The Financial Times
+.It Lk https://git.jordan.im/tent/ tent
+Python's http.server module written in Golang
+.It Lk https://git.jordan.im/pouch/ pouch
+Save pocketed articles to PDF from exported account data
+.It Lk https://git.jordan.im/dotfiles/ dotfiles
+Personal configuration files intended for unix-based systems
+.It Lk https://git.jordan.im/bin/ bin
+Miscellaneous tools and programs
+.El
+.
+.Sh SERVICES
+.Lk https://tracker.jordan.im/ bittorrent tracker
diff --git a/jordan.im/style.css b/jordan.im/style.css
new file mode 100644
index 0000000..740b52f
--- /dev/null
+++ b/jordan.im/style.css
@@ -0,0 +1,22 @@
+table.head, table.foot { width: 100%; }
+td.head-rtitle, td.foot-os { text-align: right; }
+td.head-vol { text-align: center; }
+div.Pp { margin: 1ex 0ex; }
+div.Nd, div.Bf, div.Op { display: inline; }
+span.Pa, span.Ad { font-style: italic; }
+span.Ms { font-weight: bold; }
+dl.Bl-diag > dt { font-weight: bold; }
+code.Nm, code.Fl, code.Cm, code.Ic, code.In, code.Fd, code.Fn,
+code.Cd { font-weight: bold; font-family: inherit; }
+
+html { font-family: monospace; line-height: 1.25em; }
+body { max-width: 80ch; margin: 1em auto; padding: 0 1ch; }
+table { border-collapse: collapse; }
+table.Nm code.Nm { padding-right: 1ch; }
+table.foot { margin-top: 1em; }
+
+html { background-color: var(--ansi16); color: var(--ansi17); }
+a { color: var(--ansi4); }
+a:visited { color: var(--ansi5); }
+a.permalink { color: var(--ansi3); text-decoration: none; }
+
diff --git a/tracker.jordan.im/Makefile b/tracker.jordan.im/Makefile
new file mode 100644
index 0000000..8ebf663
--- /dev/null
+++ b/tracker.jordan.im/Makefile
@@ -0,0 +1,14 @@
+WEBROOT = /var/www/html/tracker.jordan.im
+
+FILES = index.html style.css
+
+all: ${FILES}
+
+index.html: index.7
+ mandoc -T html -O style=style.css index.7 > index.html
+
+install: ${FILES}
+ install -c -m 644 ${FILES} ${WEBROOT}
+
+clean:
+ rm -f index.html
diff --git a/tracker.jordan.im/index.7 b/tracker.jordan.im/index.7
new file mode 100644
index 0000000..033aebc
--- /dev/null
+++ b/tracker.jordan.im/index.7
@@ -0,0 +1,27 @@
+.Dd November 11, 2021
+.Dt TRACKER.JORDAN.IM 7
+.Os "Debian"
+.
+.Sh NAME
+.Nm tracker.jordan.im
+.Nd a free and open bittorrent tracker
+.
+.Sh ANNOUNCE
+udp://tracker.jordan.im:6969/announce
+.
+.Sh STATS
+.
+.Pp
+The tracker has been ... [ stats to be generated ]
+.
+.Sh DESCRIPTION
+.
+.Pp
+This is a service known as a
+.Lk https://jordan.im/ipfs/bafybeiaysi4s6lnjev27ln5icwm6tueaw2vdykrtjkwiphwekaywqhcjze/wiki/BitTorrent_tracker "bittorrent tracker",
+which coordinates the reliable transmission of information between peers.
+.
+.Pp
+There is very little to be found here. There are no indexes or search boxes. You need to speak the
+.Lk https://www.bittorrent.org/beps/bep_0003.html "bittorrent protocol"
+and have knowledge of a hash to make use of this service.
diff --git a/tracker.jordan.im/style.css b/tracker.jordan.im/style.css
new file mode 100644
index 0000000..740b52f
--- /dev/null
+++ b/tracker.jordan.im/style.css
@@ -0,0 +1,22 @@
+table.head, table.foot { width: 100%; }
+td.head-rtitle, td.foot-os { text-align: right; }
+td.head-vol { text-align: center; }
+div.Pp { margin: 1ex 0ex; }
+div.Nd, div.Bf, div.Op { display: inline; }
+span.Pa, span.Ad { font-style: italic; }
+span.Ms { font-weight: bold; }
+dl.Bl-diag > dt { font-weight: bold; }
+code.Nm, code.Fl, code.Cm, code.Ic, code.In, code.Fd, code.Fn,
+code.Cd { font-weight: bold; font-family: inherit; }
+
+html { font-family: monospace; line-height: 1.25em; }
+body { max-width: 80ch; margin: 1em auto; padding: 0 1ch; }
+table { border-collapse: collapse; }
+table.Nm code.Nm { padding-right: 1ch; }
+table.foot { margin-top: 1em; }
+
+html { background-color: var(--ansi16); color: var(--ansi17); }
+a { color: var(--ansi4); }
+a:visited { color: var(--ansi5); }
+a.permalink { color: var(--ansi3); text-decoration: none; }
+
diff --git a/tracker.jordan.im/update-stats.py b/tracker.jordan.im/update-stats.py
new file mode 100755
index 0000000..bb6a977
--- /dev/null
+++ b/tracker.jordan.im/update-stats.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python3
+
+import fileinput
+import subprocess
+import sys
+
+INDEX_PATH = '/var/www/html/tracker.jordan.im/index.html'
+
+stats = dict.fromkeys(['torrents', 'connections', 'uptime'])
+
+conn = subprocess.run(
+ ['curl',
+ 'http://127.0.0.1:6969/stats?format=txt&mode=conn'],
+ stdout=subprocess.PIPE,
+)
+conn = conn.stdout.decode("utf-8").split('\n')
+stats['uptime'] = int(int(conn[2].split()[0]) / 3600)
+stats['connections'] = conn[3].split()[2]
+
+bare = subprocess.run(
+ ['curl', 'http://127.0.0.1:6969/stats?format=txt'],
+ stdout=subprocess.PIPE
+)
+bare = bare.stdout.decode("utf-8").split('\n')
+stats['torrents'] = bare[2].split()[2]
+
+s = (
+ f'The tracker has been online for {stats["uptime"]} hrs, '
+ f'serving {stats["torrents"]} torrents '
+ f'with {stats["connections"]} connections per second.\n'
+)
+
+for line in fileinput.input([INDEX_PATH], inplace=True):
+ if line.strip().startswith('The tracker has been'):
+ line = s
+ sys.stdout.write(line)