Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy HTTP/Gemtext to Gemini protocol #23

Open
d47081 opened this issue Mar 1, 2024 · 7 comments
Open

Proxy HTTP/Gemtext to Gemini protocol #23

d47081 opened this issue Mar 1, 2024 · 7 comments

Comments

@d47081
Copy link

d47081 commented Mar 1, 2024

It's possible to proxy pass gemini requests to gemtext formatted http resource?

Thanks

@omar-polo
Copy link
Owner

Can you be more specific?

Do you want to have gmid proxying something like the the duckling proxy? (it's a service that can be used as a gemini proxy and translates HTML pages in text/gemini)

Or the opposite, serving a gemini capsule via HTTP? (see for e.g. kineto or galileo.)

@d47081
Copy link
Author

d47081 commented Mar 1, 2024

I have website on Symfony and thoughts to just make separated gemtext templates there instead of create separated backend server for gemini

and pass those http/gemtext templates to gemini using gmid proxy.

in other words
http://domain.com/gemtext-uri <- gmid gemini://domain.com/gemtext-uri <- user request

@omar-polo
Copy link
Owner

Ah, I see, so you'd use gmid' proxy to make an HTTP request and serve the reply via gemini. This isn't possible currently, as gmid proxy abilities are limited to speaking gemini only.

However, it shouldn't be difficult to implement. It would require some additions to the configuration file, and then the bare minimum to speak HTTP/1.1 (as a client.)

If you are interested in implementing this feature I'd be happy to help! (otherwise, no worries, I'll think about it and will eventually add to my todo list.)

@d47081
Copy link
Author

d47081 commented Mar 1, 2024

Yes,

I think that would be super-useful as no needs to make separated backend for every existing web resource, just template only (e.g. by passing GET ?mode=gemini request).

Thanks, following the news!

@d47081
Copy link
Author

d47081 commented Mar 25, 2024

Hello, how is it going?

Thoughts to create website on GitHub Pages using Gemtext format, then make proxy with gmid.

@omar-polo
Copy link
Owner

No progress has been made yet. It's an interesting feature and it's on my TODO,, it has even made me think on ways to extend gmid for use cases like this one.

By the way, I'm not sure serving from github pages would work, as I don't think it knows that files .gmi have a text/gemini mime type, so it'll probably serve them as text/plain or application/octet-stream.

@d47081
Copy link
Author

d47081 commented Mar 27, 2024

But it could be replaced/converted/filtered by proxy backend.

I suppose to send trough http formatted gemtext only, skip those headers and return this body with gemini header 20 / mime text/gemini. Maybe make some static files cache by the way..

Or maybe that's just really crazy idea :)

It is not easy to make alternative to Nginx, you're hero anyway!
Wrote few articles to make gmid popular also.

Thank much for this work - I have only one server works fine as proxy between those madness I route here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants