Find a file
nytpu 988a00f126 Add -e flag to place a stylesheet externally rather than loading it inline
By default, kineto loads a stylesheet given to -s from disk and places
it inline with the HTML in a <style>...</style> block.  This patch adds
a -e flag to load a stylesheet externally.  When the -e flag is passed
with a URI (relative or absolute), the given link is placed in the href
of a <link rel="stylesheet"...> tag.  This helps facilitate caching
which can *significantly* reduce request overhead, particularly when the
stylesheet is large (>= the size of the page content).

The given URI is not validated, and if it is invalid the browser will
404 when requesting it and the page will have no style.
2021-05-31 17:05:38 -06:00
COPYING Initial commit 2020-10-11 13:43:39 -04:00
go.mod Update go-gemini dependency 2021-02-25 08:52:22 -05:00
go.sum Update go-gemini dependency 2021-02-25 08:52:22 -05:00
main.go Add -e flag to place a stylesheet externally rather than loading it inline 2021-05-31 17:05:38 -06:00
README.md Add -e flag to place a stylesheet externally rather than loading it inline 2021-05-31 17:05:38 -06:00

kineto

This is an HTTP to Gemini proxy designed to provide service for a single domain, i.e. to make your Gemini site available over HTTP. It can proxy to any domain in order to facilitate linking to the rest of Geminispace, but it defaults to a specific domain.

Usage

$ go build
$ ./kineto [-b 127.0.0.1:8080] [-s style.css] [-e style.css] gemini://example.org

The -b argument is optional and allows you to bind to an arbitrary address; by default kineto will bind to :8080. You should set up some external reverse proxy like nginx to forward traffic to this port and add TLS.

The -s argument is optional and allows you to specify a custom CSS filename. The given file will be loaded from the local disk and placed in a <style> block. By default kineto will serve its built-in style.

The -e argument is optional and allows you to specify a custom CSS URL. If provided, the style.css given will be treated as a link to be put in the href of a <link rel="stylesheet"...> instead of being placed inline with the body in a <style> block like with the -s flag. The given stylesheet can be a relative link, for instance -e /main.css will serve main.css from the root of the proxied Gemini capsule.

"kineto"?

It's named after the Contraves-Goerz Kineto Tracking Mount, which is used by NASA to watch rockets as they ascend to orbit.