Skip to content
/ momoka Public

🏕️ A Gemini-to-Gopher proxy that bridges the smolweb to even more smolweb

License

Notifications You must be signed in to change notification settings

gemrest/momoka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏕️ Momoka

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.


Usage

If you'd like to test out a production deployment of Momoka, you can visit gopher://fuwn.me:70/1.

Local

$ git clone git@github.com:Fuwn/momoka.git
$ cd momoka
$ gleam run
$ # or
$ nix run

Docker

docker run -p '70:70' --rm fuwn/momoka:latest

Proxy

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

Configuration

Momoka contains three environment variables that can be set to your liking.

  • ROOT – The root Gemini capsule to proxy for top-level requests (defaults to fuwn.me)
  • PORT – The port to listen on for Gopher clients (defaults to 70)
  • GEMINI_PROXY – A raw-Gemtext producing Gemini-to-HTTP proxy. (defaults to the fuwn.me September instance)

GemRest

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.

Licence

This project is licensed with the GNU General Public License v3.0.

About

🏕️ A Gemini-to-Gopher proxy that bridges the smolweb to even more smolweb

gopher://fuwn.me:70/

Topics

Resources

License

Stars

Watchers

Forks