💾 Archived View for sdf.org › blippy › spartan.gmi captured on 2024-07-08 at 23:49:44. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

spartan protocol

Created 2022-06-03. Updated 2022-11-23

Session Example

Client to download a file:

example.com /files/about.txt 0

Server response:

2 text/plain; charset=utf-8
In a hole in the ground there lived a hobbit. Not
a nasty, dirty, wet hole, filled with the ends of
worms and an oozy smell, nor yet a dry, bare...

sss: simple spartan server

I wanted to play around with the Spartan protocol. To that end, I bodged together a simple server written in Go.

It weighs in at 114 lines. It isn't complete, or pretty. The code is in the link below.

No doubt that there are security improvements to be made. Just tweaks the constants at the top of the file to suit your tastes. I use the FreeBSD packet filter (pf) to forward from port 300 to 3000.

I haven't set up a server permanently, so I've not got anything for you to poke around with.

My plan is that it will also server gopher content. Gemini content, too, if I can figure out how to get server-side TLS working.

I also have in mind the idea of using groff server-side. That way I'd be able to do stuff like have text that is short, but is reformatted nicely for the different protocols. Automatically-aligned text on gopher would be a neat feature, for example.

sss.go source

Create file: /usr/local/etc/rc.d

Edit rc.conf to include the line: sss_enable="YES"

Exits

My gitlab bombadillo fork for spartan

Spartan protocol homepage

spsrv: Full-featured spartan server