Lurker News
Back to discussion

Comment by shiomiru

shiomiru3 replies#
The extension system[0] seems interesting; it reminds me of w3m's local CGI scripts. (From what I can tell, w3m's local CGI came first, but I don't know if it influenced DPI and/or if w3m's system had a predecessor too...)

For a short description of what w3m local CGI scripts can do:
* They can be used for implementing a man page viewer, as in w3mman. It seems Dillo has a similar plugin[1].
* w3m's bookmark system is implemented using local CGI; it seems Dillo's bookmarks are implemented as a dpi plugin too.
* w3m can use urimethodmap + local CGI to implement additional protocols. I guess DPI can do that too? (At least the custom man: scheme in dillo-plugin-man seems to indicate it can.)
I had no idea any browser supported this besides w3m. I mostly imitated w3m's design in my own project (which includes the twist that support for every protocol, including HTTP, is implemented on top of a similar plugin system); I guess I have a second reference point now :)
[0]: https://dillo-browser.github.io/old/dpi1.html
[1]: https://github.com/dillo-browser/dillo-plugin-man

rodarima#
> * w3m's bookmark system is implemented using local CGI; it seems Dillo's bookmarks are implemented as a dpi plugin too.

Yeah, a lot of things [1] are implemented as DPI in Dillo. Some of the plugins implement "websites" like file:, vsource: and ftp: but others implement other features like the handling of cookies, downloads or bookmarks. As they are a different process, if you close the browser, the downloads continue.
[1]: https://github.com/dillo-browser/dillo/tree/master/dpi
> * w3m can use urimethodmap + local CGI to implement additional protocols. I guess DPI can do that too? (At least the custom man: scheme in dillo-plugin-man seems to indicate it can.)
Yes, there is a file (~/.dillo/dpidrc) that associates the protocol to the plugin binary (like this "proto.man=man/man.filter.dpi"). There is also gemini: gopher: and even git: available as external plugins.
> I had no idea any browser supported this besides w3m. I mostly imitated w3m's design in my own project (which includes the twist that support for every protocol, including HTTP, is implemented on top of a similar plugin system); I guess I have a second reference point now :)
In fact, not so long ago, the HTTPS protocol was implemented as a DPI plugin, but it was changed to be part of the browser.

andrewshadura#
As far as I remember, Arachne also did something similar.
rodarima2 replies#
Thanks for your DPI work. I tested the gemini plugin and works very well.

My only complain is that it keeps asking to confirm new keys every time a new server is visited which causes a lot of friction to explore several gemini servers. I understand that is a tradeoff between usability and security, but I wish there was a better solution than that.
For now I uploaded Charles plugin written in shell script[1], which always trusts the certificate.
[1]: https://github.com/dillo-browser/dillo-plugin-gemini/
But I'm considering switching to the Go version if I can find a way to improve the UX.
Also, I kindly ask you to add the tag "dillo-plugin" so you can make Dillo plugins easily discoverable by searching for the tag in GitHub[2].
[2]: https://github.com/topics/dillo-plugin
> I believe that in recent versions of Dillo, even https is implemented as a DPI plugin.
This was done initially[3] (before 2007) but it was moved to the browser itself[4] in 2016.
[3]: https://github.com/dillo-browser/dillo/commits/afd2763caa56d...
[4]: https://github.com/dillo-browser/dillo/commit/bf5a7783f4a192...

boomlinde#
> My only complain is that it keeps asking to confirm new keys every time a new server is visited which causes a lot of friction to explore several gemini servers.

Hmm, yeah, it's a trade off. It never annoyed me personally so I haven't given it much thought, but I could add some means to configure this behavior. There should be a commit shortly.
I've been meaning to change how it behaves when the certificate differs from the pinned one as well, because as it is now you manually have to remove the old pinned certificate from the file system when a certificate is replaced, which isn't great but at least should happen much less often.
> Also, I kindly ask you to add the tag "dillo-plugin" so you can make Dillo plugins easily discoverable by searching for the tag in GitHub[2].
Thanks for the heads up! Done.
> This was done initially[3] (before 2007) but it was moved to the browser itself[4] in 2016.
I see, so I had the chronology mixed up :).

boomlinde1 reply#
I've updated the plugin so that you can switch between auto pinning and confirmation now, via a configuration file!

Continue this thread — 1 reply