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 inmediately.

This is based on OpenBSD 6.3.

First, install a gopher server. In this case gophernicus which is available in packages.

$ 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 "onna.be" -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 defualt 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 hoow this gopher protocol works, take a look at this readme from gophernicus

Mine is just a “replica” of the http content. I just modified the shell script I use to produce the html from Markdown to do the same with plaintext, and then generate a simple gophermap. The interesting part looks like:

o--o-- Articles
        
        0Barcodes, Partkeepr and parts providers(TME)   partkeepr_barcodes_and_TME.txt  onna.be      70
        0Password management in the terminal done right.        pass_terminal.txt       onna.be      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://onna.be/