From e4781e7f379ca3572a4c4a82dfd0e218ee082a77 Mon Sep 17 00:00:00 2001 From: Erick Ruiz de Chavez Date: Wed, 8 Jan 2025 08:29:17 -0500 Subject: [PATCH] Add portal flag Proxing all small web through /x/ might not be desirable. In this commit I am adding a new argument, -p, that allows proxing all external requests using a third party proxy, like Portal (https://portal.mozz.us). By proding a value for this parameter any request made to `/x/` whose host does not match the root host will be rejected. --- .gitignore | 1 + README.md | 6 +++++- main.go | 61 +++++++++++++++++++++++++++++++++++++++++------------- 3 files changed, 53 insertions(+), 15 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..863e216 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +kineto diff --git a/README.md b/README.md index f0851f3..977abe5 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Geminispace, but it defaults to a specific domain. ``` $ go build -$ ./kineto [-b 127.0.0.1:8080] [-s style.css] [-e style.css] gemini://example.org +$ ./kineto [-b 127.0.0.1:8080] [-s style.css] [-e style.css] [-p https://portal.mozz.us] gemini://example.org ``` The -b argument is optional and allows you to bind to an arbitrary address; by @@ -30,6 +30,10 @@ in a `