A Gemini-to-Gopher proxy that bridges the smolweb to even more smolweb
Momoka is a Gopher server that proxies Gemini capsules. It fetches the Gemini page a Gopher client asks for and converts its Gemtext into a Gopher menu. Momoka is written in Gleam.
The screenshot below shows the Lagrange client displaying the Gopher and Gemini versions of a page side by side.
A public instance runs at gopher://fuwn.net:70/1.
$ git clone git@github.com:Fuwn/momoka.git
$ cd momoka
$ gleam run
$ # or
$ nix rundocker run -p '70:70' --rm fuwn/momoka:latestMomoka maps top-level requests, like gopher://fuwn.net/1, to the same path on
the root capsule. For example:
gopher://fuwn.net=>gemini://fuwn.netgopher://fuwn.net/1=>gemini://fuwn.netgopher://fuwn.net/1/blog=>gemini://fuwn.net/blog
To reach any other capsule, prefix its address with /proxy/. For example:
gopher://fuwn.net/1/proxy/geminiprotocol.net=>gemini://geminiprotocol.netgopher://fuwn.net/1/proxy/fuwn.net/blog=>gemini://fuwn.net/blog
Momoka rewrites links to Gemini pages, including relative links, so following one fetches the page through Momoka. Pages that ask for input, like search engines, become Gopher search items.
Momoka speaks Gemini directly, so it needs outbound access to port 1965. Most capsules use self-signed certificates, so Momoka does not verify them.
Momoka reads two environment variables.
ROOTis the capsule that top-level requests go to. It defaults tofuwn.net.PORTis the port Momoka listens on. It defaults to70, and Momoka exits on startup if the value is not an integer.
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 under the GNU General Public License v3.0.
