From 32c87fbc39bec28cfc0d7f49677ef06fc34d17f9 Mon Sep 17 00:00:00 2001 From: Erick Ruiz de Chavez Date: Fri, 10 Jan 2025 07:24:45 -0500 Subject: [PATCH] Add new flags for robots.txt and URL rewrites --- README.md | 20 ++++++- main.go | 170 ++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 124 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index 977abe5..4c474f4 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,24 @@ can proxy to any domain in order to facilitate linking to the rest of Geminispace, but it defaults to a specific domain. [http]: https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol -[gemini]: https://gemini.circumlunar.space/ +[gemini]: https://geminiprotocol.net/ ## Usage ``` $ go build -$ ./kineto [-b 127.0.0.1:8080] [-s style.css] [-e style.css] [-p https://portal.mozz.us] gemini://example.org +$ ./kineto [-P] [-R] [-b 127.0.0.1:8080] [-r /learn-more-about-gemini] [-s style.css] [-e style.css] [-p https://portal.mozz.us] gemini://example.org ``` +The -P argument is optional and allows you to completely disable proxying +and URL rewriting external gemini URLs. The user visiting your site will need +to have a browser or browser extension that understands how to handle +gemini:// links. + +The -R argument is optional and allows you to completely disables serving a +custom robots.txt response. When enabled the request will be proxied to your +gemini site. + 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. @@ -30,8 +39,13 @@ in a `