💾 Archived View for gemini.thegonz.net › glog › 220509-theAgenaApproach.gmi captured on 2023-07-22 at 16:57:09. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-06-03)

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

The Agena Approach

Lagrange's new support for the spartan protocol has generated some discussion on whether this should count as "bloat".

A critique of Lagrange

I don't want to take a position on that, but I do want to remind everyone of what I think is a nice general solution to the problem of supporting multiple protocols.

Solderpunk's Agena is a gemini-to-gopher proxy. It acts as a gemini server, but if it's sent a gemini request for an URI with scheme 'gopher', then it sends a gopher request to the corresponding server and translates the response into gemtext (or other appropriate mimetype) or a gemini error code, and serves it as a response to the gemini request.

Agena

Luke Emmet wrote a nice proxy along the same lines for http(s):

Duckling Proxy

Something similar could be written for spartan. Data upload of limited size could be handled using query strings, since '?' is not allowed in the path in a spartan request. (For unlimited size upload, it's tempting to stretch the concept and have the proxy also act as a titan server.)

The advantage of this approach is its modularity -- such a proxy allows arbitrary gemini clients to act as clients for the protocol it supports. This does require the client to know how to proxy requests according to their protocol, but that is straightforward to implement, and many clients support it for at least a few protocols. This includes amfora, AV-98, diohsc, and Lagrange (and probably more, that's all I checked).

I don't know how suitable this approach is for platforms like Windows or Android. Maybe you'd have to fight against some local firewalling? The other big downside is of course that the user has to install the proxy and configure their client to use it. So I can see why clients like Lagrange would prefer to just implement protocols directly. Still, I think this approach has a place.

So maybe someone wants to write an Agena-like for spartan?

I'd also encourage client authors to include a mechanism for using proxies for arbitrary user-configured schemes, rather than just a fixed list set at compile-time. You could look at diohsc for one way this can be done.