## Resting with Geomyidae Geomyidae v0.50 release presentation. by 20h ## The release story. First the release was planned to be two years ago, when I was flying from Kourou, France, back to Paris. Thus the Over the Air(!)(OTA) release »Préservatif Charles de Gaulle« He created the rocket launch facility in French Guyana, which is, if you look closely, a big French penis. Royaume du Bite - Penis Empire ## The release story. Then came the pandemic and things fell into disarray. But I wanted one big feature into this release. It seemed so easy, but it was not. But here it is! ## Release Trailer Let some famous person of the Internet give you the details: #geomyidae-release (See the video for the nice roblox hat.) ## New Features All details, just for you, by the developer! ## REST support We will look further at this at the geomyidae hackathon on Saturday. % cd $gopherroot % mkdir -p call % ed call/index.dcgi i #!/bin/sh printf "%s\n" "$2" . w q % hurl gopher://localhost/0/call/me/maybe?something /me/maybe?something ## Relative Paths in Gph files [9|Some relative path file.|../../some/file.pdf|server|port] This will be resolved to an absolute path. Writing dcgi and cgi scripts for geomyidae should be way easier now. ## TLS Support % geomyidae -t somekey somecert % curl -s gophers://localhost Hello! ## TLS Sticky Bits % chmod +t nuke-codes.txt % curl -s gopher://localhost/0/nuke-code.txt 3Sorry, but the requested token '/nuke-codes.txt' requires an encrypted connection.\tErr\tlocalhost\t7\r\n % curl -s gophers://localhost/0/nuke-code.txt ivei3teiz7giaw^ooyah ## Many Stability Features Chroot now works with perfectly everywhere for example. ## Xinetd Request Filter In web terms this is an application firewall. % cat xinetd-gopher-request-filter.sh #!/bin/sh # # Copy me if you can. # # Change to fit to your original running geomyidae instance. dstserver="localhost" dstport="7070" read -r request request="$(printf "%s\n" "${request}" | tr -d '\r')" case "${request}" in *bill-gates*|*cia*) printf "3The request cannot be handled\terror\t70\r\n" ;; *) printf "%s\r\n" "${request}" | nc "${dstserver}" "${dstport}" ;; esac ## Syslog Support % geomyidae -s % grep geomyidae /var/log/messages ## Compatibility Layer for other gopher maps % head -n 9 cgi-examples/umnlisting.dcgi #!/usr/bin/env python # coding=utf-8 # # Dir listing like in UMN gopher. # # Files: .abstract, .names, .cap/$file, .Links # Entries: Name=, Type=, Path=, Host=, Port=, Abstract=, Admin=, URL=, # TTL= # ## Compatibility Layer for other gopher maps % cp cgi-examples/umnlisting.dcgi some/old/umn/dir/index.dcgi ## Compatibility Layer for other gopher maps .Links: Main gopher menu. [Type|Name|Path|Host|Port] becomes Type=Type Name=Name Path=Path Host=Host Port=Port ... another link ## Compatibility Layer for other gopher maps .abstract files: Same format like .Links, but this time only Abstract=, where the given text is displayed at the top of the menu. ## Compatibility Layer for other gopher maps .names files: If you want to redefine some values of .Links or some existing file in the directory. ## Compatibility Layer for other gopher maps .cap/ files: If some file from the root directory is found in .cap/$file, then this will be interpreted to overwrite for example the description. This can be used to show other descriptions of files in the dir listing. ## Compatibility Layer for other gopher maps All of those link definitions allow some Numb= attribute, which will change the order of display in the dir listing. ## More CGI example scripts In cgi-examples/ you find more helpful: proxy.cgi ... frontend proxy script / could be extended to be a load balancer dirlisting.cgi ... a more complex dir listing rest.dcgi ... showing all new REST features guestbook.dcgi ... simple guestbook example ## Docker File With TLS support! % cat docker/Dockerfile FROM alpine AS build WORKDIR /usr/local/src/geomyidae RUN apk update && apk add build-base libressl-dev git RUN git clone git://bitreich.org/geomyidae /usr/local/src/geomyidae RUN make FROM alpine COPY --from=build /usr/local/src/geomyidae/geomyidae /usr/local/sbin/geomyidae EXPOSE 70 CMD geomyidae -d -h 0.0.0.0 ## Sendfile() has been removed. /* * The story of xsendfile. * * Once upon a time, here you saw a big #ifdef switch source of * many ways how to send files with special functions on * different operating systems. All of this was removed, because * operating systems and kernels got better over time, * simplifying what you need and reducing corner cases. * * For example Linux sendfile(2) sounds nice and faster, but * the function is different on every OS and slower to the now * used approach of read(2) and write(2). * * If you ever consider changing this to some "faster" approach, * consider benchmarks on all platforms. */ ## Simpler Makefile In a major move, bitreich projects move towards full output of what is given to the compiler, for easier debugging and fixing. ## Filetypes.h % head -n 20 filetypes.h /* * Copy me if you can. * by 20h */ #ifndef FILETYPES_H #define FILETYPES_H #include "ind.h" /* * Before adding any filetype, see the comment in ind.c. */ filetype type[] = { {"default", "9", handlebin}, {"gph", "1", handlegph}, {"cgi", "0", handlecgi}, {"dcgi", "1", handledcgi}, {"bin", "9", handlebin}, ## Gopher+ Compatibility is complete now /* * This is a compatibility layer to geomyidae for users using * the original gopher(1) client. Gopher+ is by default * requesting the metadata. We are using a trick in the * gopher(1) parsing code to jump back to gopher compatibility * mode. DO NOT ADD ANY OTHER GOPHER+ SUPPORT. GOPHER+ IS * CRAP. */ if (*sear == '+' || *sear == '$' || *sear == '!' || *sear == '\0') { if (loglvl & GPLUS) logentry(clienth, clientp, recvb, "gopher+ redirect"); dprintf(sock, "+-2\r\n"); dprintf(sock, "+INFO: 1gopher+\t\t%s\t%s\r\n", ohost, port); dprintf(sock, "+ADMIN:\r\n Admin: Me\r\n"); return; } ## Geomyidae SVG logo ,WWNN......kNWW. ,N K00K NN N ,Nkl,;ckkkO00OK 0c;,ckN N :;.d kOk0KK0k kKd.,: N N klK :xOkxK dKKlx N W lKKO k;d0kxKo OdKKKl W W xkKKKKkOk0KK0kOkKKKKxk W W xOKKKOd,:, ;:,d0KKKkx W N xOKKk..',:;;:''..OKKkx N xOKKKKKK0xdddKKKKKKKkxN xxOOOOOOOOOOOOOOOOOOdx c'''''''dooOOd'''''''c l:::::::ollddo:::::::o See the geomyidae.svg for better colors. ## Geomyidae Path change Geomyidae is now in /usr/sbin instead of /usr/bin. This is for better compatibility inbetween file hierarchies. ## Thanks to everyone who contributes! Thanks to all people who sent in patches and made this possible. ## Further Development Geomyidae is feature-complete. My TODO list is empty. For me it is about stabilizing and making it better to use for users. ## Gph new escape design discussion Current gph escaping: Some text. [1|Some link|/link|server|port] ttext is here Will lead to: Some text. Some link text is here This requires escaping of all lines beginning with 't'. ## Gph new escape design discussion The proposal is to use: [|text is here Geomyidae is already showing a happy helping snowman, when this is somewhere on a line, since an empty type is illegal and illogical. We would just use a gap here in the specification. All t escaping could be gone. What do you think? ## Geomyidae Hackathon On Saturday we will have a hackathon on geomyidae with following goals: 1. Do the new escape implementation. 2. Optimize download speeds. 3. Write REST services for gopher2web gateways. People will learn about Linux socket internals, how to write their own gopher REST services and know how gph is internally parsed. It will be fun! See you on Saturday! ## Questions? Any Questions? ## Outro Thanks for listening! All questions and critique please send them to: Christoph Lohmann <20h@r-36.net>