the fast, reliable localhost tunneling solution


Tunnel Finger and Thimbl

By Bjarni RĂșnar Einarsson 2011-07-04, 23:04

PageKite can be used to expose a finger server to the public, or to make an particular page (or set of pages) on an HTTP server available using the finger protocol.

This feature was added to allow people without public/fixed IP addresses to directly participate in Thimbl, an experimental distributed micro-blogging network.

Getting started

Getting up and running with this snapshot of the 0.4 version of pagekite.py is probably easiest for most people:

$ echo Plan: | tee .finger
$ pagekite.py .finger httpfinger://ANYTHING.pagekite.me:/~USER/

You should now be able to finger yourself in another terminal with:

$ finger USER+ANYTHING.pagekite.me@ANYTHING.pagekite.me

This assumes:

  1. You want the Thimbl address USER+ANYTHING.pagekite.me@ANYTHING.pagekite.me
  2. You replace ANYTHING and USER with your preferences.
  3. You will add more useful things to the .finger file.

Note that the .finger file should preferably contain a complete finger response. For Thimbl to work, the minimum is the word Plan: on a line by itself, followed by the Thimbl JSON data.

If you don't already have a PageKite account, the program should walk you through the sign-up process. If you want to add this to an existing pagekite.py 0.4.x configuration, put the --add argument before the port number, or read on for more details on how to manually update an existing configuration file.

Note: Thimbl-CLI has been updated (we sent a patch) so it can be used to directly edit Thimbl data in .finger files (symlinked to .plan), without choking on or destroying the non-JSON preamble.

Note 2: Note that pagekite.net and pagekite.me are not a gratis service, but the trial period is generous and all our software is free and open source.

Requirements

The 0.4.4 and 0.3.22 versions of pagekite.py will add support for tunneling the finger protocol, as well as support for serving finger requests using an HTTP server instead of a traditional finger daemon.

Until those versions are released, these features can be found on GitHub or in this development snapshot. Just keep in mind that (like Thimbl) this code is pretty new and experimental still. This snapshot has been tested on Ubuntu 11.04, and it may depend on you having a relatively recent version of Python.

If you don't want to use pagekite.py's built in HTTPD, you will need either a finger daemon or a web server.

See the Thimbl site for details on how to use this for micro-blogging.

Using fingerd

If you already have a finger daemon running on your computer, the following back-end definition will make it visible to the world:

backend=finger:YOU.pagekite.me:localhost:79:SECRET

People from outside will now be able to finger your users using commands like this:

$ finger user+you.pagekite.me@you.pagekite.me

Note that the domain has to be embedded (repeated) in the user-name portion of the address, because the finger protocol lacks support for name-based virtual hosts. This is admittedly a bit ugly, but it does work.

Using a web server

If you would rather use a local web server than a real finger daemon, you can use the httpfinger psuedo-protocol instead of finger in the back-end definition:

backend=httpfinger:YOU.pagekite.me:localhost:80:SECRET

And optionally, you can provide a recipie for how to convert the user-name into a path on your server, like so:

# Default is /~%s/.finger = http://localhost/~USER/.finger
fingerpath=/people/%s/.finger

Or if you want to respond to all users with the same file:

fingerpath=/path/to/finger.txt

Whatever file that resolves to will be served as an answer to finger requests, for that user. Note that you can write anything you like in this file, but formatting it similarly to a normal finger response would probably be the polite thing to do.

For Thimbl, the file must at least contain the word Plan: on a line by itself, followed by JSON formatted Thimbl data.

On the front-end

If you want to run your own PageKite front-end and allow your users to run finger servers of their own, you will need to:

  • Add port 79 to the list of raw ports, for example: --rawports=22,79,virtual
  • Add finger and httpfinger to your protocol list (or just use the defaults)
  • You may need to run pagekite.py as root, to get access to port 79.

Comments

None yet, you can be first!

Leave a comment

( (Please leave these blank: )

We use Gravatar for commenter's photos. Get your own, it's free!