The first Firefox extension for browsing gemsites.
Go to file
Anedroid f92a71d206
Added unordered lists
Fixed minor bugs: scrolling long preformatted blocks, headers text, the apostrophe (') char
2022-08-10 19:44:20 +02:00
php-proxy Response limit is now 1 MiB (it was 10 KiB before) 2022-08-03 19:42:15 +02:00
src Added unordered lists 2022-08-10 19:44:20 +02:00
LICENSE Started from Free license. Because so. 2022-07-26 20:53:08 +02:00
README.md Added README to (incomplete yet) project. 2022-08-03 15:56:50 +02:00

README.md

Mozjail gemini

The first Firefox extension for browsing gemsites.

Hey! Keep in mind this project is not finished yet. When I publish the first version, it will be available to download in releases tab. If you want to help, try to find and fix bugs (at the moment there may be many of them!) and send me a pull request. Code cleanup and optimizations are also very welcome. Feel free to write your suggestions at issues or on Mastodon:

=> my Mastodon profile

The name

You may be wondering why I chose the name "Mozjail" it's because of lots of pointless, artificial restrictions Mozilla had put on Firefox. Here are some of them:

  • All extensions need to be digitally signed (verified) by Mozilla in order to be able to install it in the browser. It doesn't matter the extension (a xpi file) can be downloaded from any place on the Internet, Mozilla have got control over what users can install in their own browsers. There's a config option xpinstall.signatures.required which lets you override this, but... in official Firefox builds this option is ignored. The same apply to all distributions of Firefox for Android. This malicious technique is called "tivoization", from Tivo device where it was observed first. Mozilla would claim it's because of security. You are (probably) not a child anymore, so you should be able to install whatever-you-want in your browser, and to decide on your own what to consider as trustworthy. You have right install your own extensions you have either written or modified without asking Mozilla for permission.
  • Firefox extensions can handle custom url handlers, but only those approved by Mozilla or starting with web+ or ext+. I have no idea why this restriction does exist in Firefox. If you are here, you probably know that current web is in a horrible state. Doing this, Mozilla effectively works against alternative protocols, such as gemini. Of course, they can add support for gemini url handler, but hey: why we have to ask Mozilla for permission? What if they don't approve it because of some political or business reasons?
  • Firefox extensions don't have access to TCP sockets, like in "normal" programming languages (C++, PHP, ...). As I can understand JavaScript used on websites have some restrictions on connections they can make, however browser extensions are not a websites: these are programs user intentionally install they should have more power, and the websites less. Again, because of this kind of restriction, it's hard to extend the browser capabilities in a way, that it start supporting other alternative protocols.

The restrictions I have listed above are putted on extensions and does hurt as developers, as users. Unfortunately, if we want to support free (libre), open, private and safe Internet, we don't have many alternatives: Firefox forks seems to be the best available choices after rejecting Chromium-based browsers. All these restrictions I had felt on my own skin (and probably there are more!). I had to find workarounds for simple things: that's why you need to run http proxy communicating with the extension, cannot just click on a gemini link to open, nor install it on locked-down Firefox version. And that's the reasons I have named this extension "Mozjail gemini".

What we can do?

  • Use a standalone gemini client instead and don't care. There are many choices available. My favorite is Lagrange.
  • Try to make a real Firefox fork (because taking into account size of current web standards, only big-tech corporations have enough resources and money to create a competitive browser from scratch), remove all antifeatures, separate project from Mozilla and continue its development on your own. Give more power to extensions and less to websites.
  • Complain about Mozilla's decisions and their respect for users freedom and privacy. Once they were "the last hope" for the Internet dominated by Google, now gemini is. Maybe persuade them to give control back to users hands?

=> List of gemini clients, servers & other software

Installation and run

As there is no xpi file at the moment, you can temporary load the extension to any desktop Firefox variant and start hacking on it:

  1. Go to about:debugging > This [the name of the browser] > Load Temporary Add-on...
  2. Choose manifest.json file.
  3. Run PHP proxy with this command:
php php-proxy/proxy-inet.php server

Port which it's running on will be displayed  by default 5691 (1965 reversed). Minimum PHP version is 7.4. It may work on older versions, but I don't guarantee.

  1. Open any gemini link, but add web+ to the beggining of the URL.

If you prefer permanent installation, you will need a jailbroken Firefox fork, for example GNU IceCat. To unlock, go to about:config and switch xpinstall.signatures.required to false.

  1. zip all files in src/ directory and change the file extension to xpi. You can do this with this command:
cd src/
zip extension.xpi *
  1. Open created file in your web browser.

License

As always, I license my software under copyleft GNU GPL version 3 license to make sure its every user have 4 essential freedoms: freedom to run, study, modify and share the software.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

=> copy of the GNU General Public License

Don't make non-free software it hurts people and the Free Software community!


=> I do not use Microsoft GitHub