Gopher !

2018-08-04

** Update 2019-12-22: Changed links to gophernicus source code, as yargo@sdf points out, the original author passed the flag some time ago. Thank you Yargo.

It came to my attention that gopher is still active. And I could not anticipate how active !

I like it's simplicity, and the lack of ads/tracking/otherevils so I though that I would put the content of this site (for what is worth) available on port 70 too.

Here's how, so I don't forget immediately.

This is tested on OpenBSD 6.3 all the way to 6.9.

First, install a gopher server. In this case gophernicus

$ doas pkg_add gophernicus

I used inetd(8) to expose gophernicus to the world, adding this line to /etc/inetd.conf:

gopher stream tcp nowait _gophernicus /usr/local/libexec/in.gophernicus in.gophernicus -h "e1e0.net" -nv

-h is hostname, and should be a valid one (the hostname of the machine). -nv is disable virtual hosting, which I don't use. There's more options in it's help or github, but with -h you're good to go.

By default gophernicus will server content on /var/gopher. So once inetd is (re)started, you can take your gopher client of choice and take a look. You should see something like

Welcome to Gophernicus!
 _______               __                      __
 |     __|.-----.-----.|  |--.-----.----.-----.|__|.----.--.--.-----.
 |    |  ||  _  |  _  ||     |  -__|   _|     ||  ||  __|  |  |__ --|
 |_______||_____|   __||__|__|_____|__| |__|__||__||____|_____|_____|
                |__|

If you can see this, it means that the installation of Gophernicus
on this system was successful. You may now add content to this
directory and replace this page.

...

That's the default "gophermap". You can start adding content to the default folder at this time, but modifying the gophermap to look better and link to some content is better.

For some instructions on how this gopher protocol works, take a look at this readme from gophernicus.

Mine is the same content served on http. I decided not so long ago to just write everything in plain text and create index.html/gophermaps as needed. So simplicity to the max.

o--o-- Articles

0Barcodes, Partkeepr and parts providers(TME)   partkeepr_barcodes_and_TME.txt  e1e0.net    70
0Password management in the terminal done right.    pass_terminal.txt   e1e0.net    70

As the readme pointed earlier explains, first line is just text (you can write or put fancy ASCII banners or whatever). Then the links have this syntax:

Xname<TAB>selector<TAB>host<TAB>port

Where selector is the path to the resource and X is one of:

Valid filetypes include:
   0   text file
   1   directory
   3   error message
   5   archive file (zip, tar etc)
   7   search query
   8   telnet session
   9   binary file
   g   GIF image
   h   HTML file
   i   info text
   I   generic image file (other than GIF)
   d   document file (ps, pdf, doc etc)
   s   sound file
   ;   video file
   c   calendar file
   M   MIME file (mbox, emails etc)

There are a couple more special chars for that first line character. Take a look at docs.

So now the terminal lovers can find this site at gopher://e1e0.net/

Have any comments ? Send an email to the comments address.