e1e0.net

sources for e1e0 website
git clone https://git.e1e0.net/e1e0.net.git
Log | Files | Refs

gopher.md (3515B)


      1 Title: Gopher !
      2 Author: paco
      3 Date: 2018-08-04
      4 Type: article
      5 
      6 _** Update 2019-12-22: Changed links to gophernicus source code, as yargo@sdf
      7 points out, the original author passed the flag some time ago.  Thank you
      8 Yargo._
      9 
     10 It came to my attention that [gopher][1] is still active. And I could not
     11 anticipate how active !
     12 
     13 I like it's simplicity, and the lack of ads/tracking/otherevils so I
     14 though that I would put the content of this site (for what is worth)
     15 available on port 70 too.
     16 
     17 Here's how, so I don't forget immediately.
     18 
     19 This is tested on OpenBSD 6.3 all the way to 6.9.
     20 
     21 First, install a gopher server. In this case [gophernicus][2]
     22 
     23     $ doas pkg_add gophernicus
     24 
     25 I used inetd(8) to expose gophernicus to the world, adding this line to
     26 /etc/inetd.conf:
     27 
     28     gopher stream tcp nowait _gophernicus /usr/local/libexec/in.gophernicus in.gophernicus -h "e1e0.net" -nv
     29 
     30 `-h` is hostname, and should be a valid one (the hostname of the
     31 machine). `-nv` is disable virtual hosting, which I don't use. There's
     32 more options in it's help or github, but with `-h` you're good to go.
     33 
     34 By default gophernicus will server content on `/var/gopher`. So once
     35 inetd is (re)started, you can take your gopher client of choice and take
     36 a look. You should see something like
     37 
     38     Welcome to Gophernicus!
     39      _______               __                      __
     40      |     __|.-----.-----.|  |--.-----.----.-----.|__|.----.--.--.-----.
     41      |    |  ||  _  |  _  ||     |  -__|   _|     ||  ||  __|  |  |__ --|
     42      |_______||_____|   __||__|__|_____|__| |__|__||__||____|_____|_____|
     43                     |__|
     44 
     45     If you can see this, it means that the installation of Gophernicus
     46     on this system was successful. You may now add content to this
     47     directory and replace this page.
     48 
     49     ...
     50 
     51 
     52 That's the default "gophermap". You can start adding content to the
     53 default folder at this time, but modifying the gophermap to look better
     54 and link to some content is better.
     55 
     56 For some instructions on how this gopher protocol works, take a look at
     57 this [readme][3] from gophernicus.
     58 
     59 Mine is the same content served on http. I decided not so long ago to
     60 just write everything in plain text and create index.html/gophermaps as
     61 needed. So simplicity to the max.
     62 
     63     o--o-- Articles
     64     
     65     0Barcodes, Partkeepr and parts providers(TME)	partkeepr_barcodes_and_TME.txt	e1e0.net	70
     66     0Password management in the terminal done right.	pass_terminal.txt	e1e0.net	70
     67 
     68 As the readme pointed earlier explains, first line is just text (you can
     69 write or put fancy ASCII banners or whatever). Then the links have this
     70 syntax:
     71 
     72     Xname<TAB>selector<TAB>host<TAB>port
     73 
     74 Where `selector` is the path to the resource and `X` is one of:
     75 
     76     Valid filetypes include:
     77        0   text file
     78        1   directory
     79        3   error message
     80        5   archive file (zip, tar etc)
     81        7   search query
     82        8   telnet session
     83        9   binary file
     84        g   GIF image
     85        h   HTML file
     86        i   info text
     87        I   generic image file (other than GIF)
     88        d   document file (ps, pdf, doc etc)
     89        s   sound file
     90        ;   video file
     91        c   calendar file
     92        M   MIME file (mbox, emails etc)
     93 
     94 There are a couple more special chars for that first line character.
     95 Take a look at docs.
     96 
     97 So now the terminal lovers can find this site at gopher://e1e0.net/
     98 
     99 [1]: https://en.wikipedia.org/wiki/Gopher_(protocol)
    100 [2]: https://github.com/gophernicus/gophernicus
    101 [3]: https://github.com/gophernicus/gophernicus/blob/master/README.Gophermap