I wrote a minimalist finger server in gleam

2 months ago by absolutely_vivid to c/gleam

Partying like it's 1977!

I recently stumbled on the finger protocol through happynetbox and thought it was pretty cool, so I wrote a finger server that reads user data from text files. It's a pretty simple protocol, but I think it's a fun way to enable a simple smolnet-style status page :)

thoughtfuldragon 3 points 2 months ago

Perhaps look at running it with a systemd .socket file so you don't need to redirect a port using iptables. That iptables rule would let any userspace application take over port 79 if your program crashes. Having the socket opened and managed by systemd means your app doesn't need to run as root but only your app can answer connections to port 79. You also get a measure of resiliency from systemd being able to restart your service if it crashes.

path: 0 25487071, hotness: undefined, score: 3, children: 2
MonkderVierte 1 point 2 months ago

Will it stop working with dinit then?

path: 0 25487071 25493393, hotness: undefined, score: 1, children: 0
absolutely_vivid 1 point 2 months ago

That's really cool! Unfortunately I have ethical issues with systemd, so I'd rather not support it as a first-class option in documentation or out of the box configs. Thankfully something taking over port 79 isn't a concern on any of my threat models for the software. I still require root for low ports on all my systems (to stop takeovers of 80, 443, 22, etc) but something listening on the finger port is going to be pretty harmless. Just don't try to finger hunter2@example.com :p

path: 0 25487071 25606064, hotness: undefined, score: 1, children: 0
gleam
gleam

@programming.dev

login for more options
146
34
10

A community for the gleam programming language! https://gleam.run/

go to feed...