Telnet gateway

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

A telnet gateway giving access to Wikimedia content is now available. It was announced in the Wikipedia Signpost. You can connect to it either as a traditional TELNET service or as a Tor hidden service.

Telnet hostname
Tor hidden service

The Tor hidden service provides end-to-end encryption and anonymity. To connect to it, you will need to install Tor, and a Telnet (or raw socket) client that can communicate with Tor's local SOCKS proxy. On Linux, socat suffices, for example with the command line:

socat - SOCKS4A:localhost:lgcjxm7fttkqi2zl.onion:23,socksport=9050

PuTTY can also be used, and is available for Windows and UNIX-like systems. Enter "lgcjttkqi2zl.onion" as the hostname, and under Connection > Proxy, select proxy type "SOCKS 5", proxy hostname "localhost", port 9050.

The telnet gateway was written by C. Scott Ananian, inspired by a gist of Ori's, and is based on the Offline Content Generator (OCG), which in turn is based on Parsoid. The plaintext output is actually available from OCG on most Wikimedia projects using the Book Creator link in the sidebar: use the "Word processor (plaintext)" format option under "Download".

Parsoid is the grease which makes doing useful stuff with wikitext content easy. (Assuming you call a telnet gateway "useful"!) If you'd like to learn more about Parsoid, there are slides and video from a tutorial we did last year, and a phabricator ticket where you can ask questions about the demos in the tutorial. Alternatively, you could play with the experimental JavaScript API.

Notable features:

  • Server-side line editing with readline
  • Tab completion of article titles, using the Discovery Team's groovy suggestion service
  • With the ":use" command, you can connect to any Wikimedia wiki which supports the Wikimedia REST API.

For more information, please see the GitHub project page for wikipedia-telnet.

File bugs and feature requests on GitHub for now.


If the service is down, it can be started on telnet2.telnet.eqiad.wmflabs with

start wikipedia-telnet

The node.js service listens on port 1081, and there is an iptables redirect from port 23 to port 1081. This allows the service to run as an unprivileged user.