A proxy for Web pages in Gemini

Nader K. Rad <me (a) nader.pm>

Hello everyone,
I'm new here, and I've set up my Gemini capsule only a couple of days ago. 
I was writing a new article today when I had to reference a Web page, and 
I started thinking: What if there's a Web proxy for Gemini?

I've seen Gemini proxies for Web, but not the other way around. Instead of 
external links, writers can add a link via the proxy, and the readers can 
stay in Gemini and read the referenced article.

For example, if the proxy is at gemini://example.proxy, and the writer 
wants to link to https://example.com, they can add a link to 
gemini://example.proxy?https://example.com. When the proxy receives such a 
request, it can pass the link to Mozilla's readability script to clean it 
up, and then pipe the output through another script to convert it to 
gemtext. A link to the original Web page can be added to the top, in case 
the readability script couldn't do its job well enough. The output will be 
served to the user, and it will be cached for future requests (for one 
month, for example). 

Any ideas?

Link to individual message.

contact@medusae.space <contact (a) medusae.space>

On 2021-02-10 23:46, Nader K. Rad wrote:
> Hello everyone,
> I'm new here, and I've set up my Gemini capsule only a couple of days
> ago. I was writing a new article today when I had to reference a Web
> page, and I started thinking: What if there's a Web proxy for Gemini?

I guess that this come close to what you want:
https://github.com/LukeEmmet/duckling-proxy

(I've never tried it)

-- 
La?rte

Link to individual message.

John Cowan <cowan (a) ccil.org>

I have used duckling-proxy with Lagrange, and it makes a good static-Web
browser.

On Wed, Feb 10, 2021 at 6:09 PM <contact at medusae.space> wrote:

> On 2021-02-10 23:46, Nader K. Rad wrote:
> > Hello everyone,
> > I'm new here, and I've set up my Gemini capsule only a couple of days
> > ago. I was writing a new article today when I had to reference a Web
> > page, and I started thinking: What if there's a Web proxy for Gemini?
>
> I guess that this come close to what you want:
> https://github.com/LukeEmmet/duckling-proxy
>
> (I've never tried it)
>
> --
> La?rte
>

Link to individual message.

Andreas R. <avr (a) softwarelibre.nl>

On Wed, Feb 10, 2021 at 10:46:34PM +0000, Nader K. Rad wrote:
> Hello everyone,
> I'm new here, and I've set up my Gemini capsule only a couple of days 
ago. I was writing a new article today when I had to reference a Web page, 
and I started thinking: What if there's a Web proxy for Gemini?
> 
> I've seen Gemini proxies for Web, but not the other way around. Instead 
of external links, writers can add a link via the proxy, and the readers 
can stay in Gemini and read the referenced article.
> 
> For example, if the proxy is at gemini://example.proxy, and the writer 
wants to link to https://example.com, they can add a link to 
gemini://example.proxy?https://example.com. When the proxy receives such a 
request, it can pass the link to Mozilla's readability script to clean it 
up, and then pipe the output through another script to convert it to 
gemtext. A link to the original Web page can be added to the top, in case 
the readability script couldn't do its job well enough. The output will be 
served to the user, and it will be cached for future requests (for one 
month, for example). 
> 
> Any ideas?

I have set up 
gemini://webgate.geminet.org/web.sh
for that occasion.

It's a simple cgi-script that uses gemget and duckling proxy.

I still need to patch duckling proxy to rewrite all the hrefs in the html 
document, so you can follow them without
leaving gemini, but for now, for a single referenced page on the web, it 
might already be useful.

Link to individual message.

Callum Brown <callum (a) calcuode.com>

On Wed, 10 Feb 2021 22:46:34 +0000, <me at nader.pm> wrote:
> For example, if the proxy is at gemini://example.proxy, and the writer
> wants to link to https://example.com, they can add a link to
> gemini://example.proxy?https://example.com. When the proxy receives
> such a request, it can pass the link to Mozilla's readability script
> to clean it up, and then pipe the output through another script to
> convert it to gemtext. A link to the original Web page can be added to
> the top, in case the readability script couldn't do its job well
> enough. The output will be served to the user, and it will be cached
> for future requests (for one month, for example).

This uses Mozilla's readability script, but doesn't deal with caching.

https://git.sr.ht/~sircmpwn/cgi-scripts/tree/master/item/web.sh
https://git.sr.ht/~sircmpwn/cgi-scripts/tree/master/item/web2gmi.js

Link to individual message.

Luke Emmet <luke (a) marmaladefoo.com>



On 11-Feb-2021 07:18, Andreas R. wrote:
> On Wed, Feb 10, 2021 at 10:46:34PM +0000, Nader K. Rad wrote:
>> Hello everyone,
>> I'm new here, and I've set up my Gemini capsule only a couple of days 
ago. I was writing a new article today when I had to reference a Web page, 
and I started thinking: What if there's a Web proxy for Gemini?
>>
>> For example, if the proxy is at gemini://example.proxy, and the writer 
wants to link to https://example.com, they can add a link to 
gemini://example.proxy?https://example.com.
> I have set up
> gemini://webgate.geminet.org/web.sh
> for that occasion.
>
> It's a simple cgi-script that uses gemget and duckling proxy.
>
> I still need to patch duckling proxy to rewrite all the hrefs in the 
html document, so you can follow them without
> leaving gemini, but for now, for a single referenced page on the web, it 
might already be useful.

Great to hear you found another way of using Duckling Proxy, but using 
it in this way does make for a more opaque and constrained web 
experience than it needs to. Really Duckling is intended as a scheme 
specific proxy - ie. you configure your client so it handles *any* web 
request transparently. In this way you don't need to rewrite any URLs 
and its always clear what URL you are visiting.

Also the other side of the coin is that you make it harder for visitors 
to your gemini page to make their own decision how to open the URL. Some 
users will prefer to launch the system browser, others will use a client 
that could render the web page directly, and yet others still will use a 
scheme proxy. By wiring up the web link yourself, you constrain the end 
user to control that aspect of the experience themselves.

Another, perhaps better fix, might be to update the client so it can use 
a scheme specific proxy like Duckling (HTTP) or Agena (Gopher) and share 
the update. There are a few that support this intrinsic gemini concept 
(GemiNaut, Amfora, Lagrange, AV-98, Diohsc off the top of my head).

But each to their own!

 ? - Luke

Link to individual message.

---

Previous Thread: [ANN] New capsule

Next Thread: A Gemini to Markdown Filter