A Gemini-to-Gopher proxy that bridges the smolweb to even more smolweb
Momoka is a Gopher proxy that sits in between Gopher clients and Gemini servers. It translates any Gemini requests containing Gemtext into Gopher-compatible responses.
Momoka is written in under 350 (345) lines of code in the functional Gleam programming language. It's designed to be small and simple.
For reference of accuracy, here is a screenshot of the Lagrange client displaying both the Gopher and the Gemini responses side-by-side. It's literally the same output.
If you'd like to test out a production deployment of Momoka, you can visit
gopher://fuwn.me:70/1
.
$ git clone git@github.com:Fuwn/momoka.git
$ cd momoka
$ gleam run
$ # or
$ nix run
docker run -p '70:70' --rm fuwn/momoka:latest
By default, top-level requests, like gopher://fuwn.me/1
, are proxied to
their mapped Gemini equivalents. Here are a few examples.
gopher://fuwn.me
=>gemini://fuwn.me
gopher://fuwn.me/1
=>gemini://fuwn.me
gopher://fuwn.me/1/index2
=>gemini://fuwn.me/index2
Prepending /proxy/
to the path will allow you to proxy any Gemini server.
Here are a few examples.
gopher://fuwn.me/1/proxy/geminiprotocol.net
=>gemini://geminiprotocol.net
gopher://fuwn.me/1/proxy/fuwn.me/index2
=>gemini://fuwn.me/index2
Momoka contains three environment variables that can be set to your liking.
ROOT
– The root Gemini capsule to proxy for top-level requests (defaults tofuwn.me
)PORT
– The port to listen on for Gopher clients (defaults to70
)GEMINI_PROXY
– A raw-Gemtext producing Gemini-to-HTTP proxy. (defaults to the fuwn.me September instance)
I'm also the author of GemRest, the largest organisation of Gemini-oriented software, tooling, and libraries. If you're interested in Gemini, I'd recommend checking it out.
This project is licensed with the GNU General Public License v3.0.