Corewala / Buran

Gemini browser for Android
GNU General Public License v3.0
107 stars 10 forks source link

Feature request: HTTP proxy support #26

Closed acidus99 closed 2 years ago

acidus99 commented 2 years ago

I've been playing with Duckling Proxy, which is a gemini-to-HTTP gateway.

Basically this acts as a proxy, converting HTML to gemtext on the fly, and responding with the appropriate gemini response codes/lines.

Other clients like Amfora, AV-98, and Lagrange allow you to define an HTTP proxy. When you click a link line in gemtext that points to an HTTP/HTTPS url, the client instead connects to the proxy and uses the HTTP(S) URL as the gemini request line. This is really cool since it makes it trivial to access images, etc, that happen to be linked.

From a developer perspective its nice since everything is still gemini requests and responses. Your HTTP link handling logic changes (handle it yourself vs pass to external program based on whether the proxy is configured), and perhaps the logic about what URLs are allowed to make it into gemini requests

I would suggest this as a cool feature for Buran. It would be inside of Settings, so it would not be disruptive to the normal user experience.

If you'd like to experiment, I actually run a public Duckling proxy that you can play with: gemini://gemi.dev/stargate.gmi

Corewala commented 2 years ago

I'll add this to the todo list

Corewala commented 2 years ago

I'm not sure where I should report this, but I think that your Duckling instance is down at the moment. Thanks for providing this service by the way, I wouldn't have been able to test the proxy feature without it.

UPDATE: It seems to be fixed now

Corewala commented 2 years ago

I've added a (hopefully) working implementation, and I'll be making a release later today if everything goes as planned :)

acidus99 commented 2 years ago

Awesome. I'll give it a test