Flagfox 6.1 Beta 1

Mozilla finally added some rather crucial missing WebExtension APIs, about a year late, and Flagfox 6.1 now takes advantage of them to reimplement some of the major features that were forced to be dropped in Flagfox 6.0. Firefox 60+ is required. This is still an experimental development version, so the standard beta warning to backup your stuff applies, but it’s not likely to hurt anything (occasionally backing up your browser profile(s) is just good advice, in general). Whilst this beta is available due to new features added by Mozilla, it’s also hindered by yet more features eliminated by Mozilla: they removed the beta channel from AMO. I feel like they often do everything in their power to make this more difficult… (intentional, or not). Nonetheless, AMO at least supports signing of off-site WebExtensions, so these versions are code signed and will work in a normal release version of Firefox without special configuration. Automatic beta updates are not available, however, once a future release version of Flagfox 6.1+ is available, it should automatically update to that and function normally thereafter (“should” being the operative word). This first beta file is available to download and install from the downloads page here.

Of course writing this took longer than expected; nothing new there. Fiddling with hotkey input was particularly annoying because Mozilla added an API to update a shortcut at runtime, but didn’t actually create an API to validate such a shortcut. Triggered shortcuts can also be intercepted via one event when trying to input them, but not another, and inconsistently, at that. What’s worse, setting it to a test binding is not 100% reliable either, as it can in fact occasionally accept a shortcut it won’t allow. Thus is the standard downfall of artificial APIs: nobody who makes them actually uses them in any real scenario, resulting in easily missed bugs and necessities. Of course everything is even less reliable when recycling somebody else’s API, as in the case with Mozilla basing their WebExtension API on Google Chrome’s. At least they’re willing to diverge from it, when necessary, now.

Flagfox 6.1b1 changelog:

  • Reimplemented support for fetching IPs from the DNS cache, instead of only requests (new WebExt API)
  • Reimplemented support for customizable hotkeys for actions, instead of just one default (new WebExt API)
  • Reimplemented action availability check on menu open, instead of all tab changes (new WebExt API)
  • Improved startup to attempt to load icons into existing tabs, where possible
  • Rewrote IP/host cache, yet again (having the DNS API makes things way less complex now)
  • Added support for all action types in context menus, where now possible (IPs obtainable via DNS cache)
  • Changed hotkey pref save format to match new API; old ones from Flagfox 5.2.x will be imported
  • Added detection and indication of invalid or existing hotkeys, when setting (not 100%, due to iffy API)
  • Added ability to undo a hotkey change without having to cancel config, via escape key
  • Switched to PointerEvents where applicable (only minor use)
  • Improved opening of new tabs to use openerTabId; now opened next to subject, instead of end of strip
  • Support for Tree Style Tabs addon (and similar) is now available again due to openerTabId change
  • Dropped now-defunct XMarks action from defaults
  • Various code cleanups
  • Dropped support for Firefox 56-59, as Mozilla only finally added the new APIs used here in Firefox 60

Known Issues:

  • Keyboard shortcuts are limited to one of Ctrl/Alt (or Command, on Mac), potentially Shift, with a character key. Using Ctrl and Alt at the same time is not supported by Firefox, here. The restriction to character keys is the same as prior versions, however. I might add F-key support, but so many combos with those are tied to OS functions that I think I’ll just consider it not worth the risk of accidents. In addition to the ones that are used as built-in Firefox shortcuts, most punctuation keys are also not supported by the API. The total list of allowed keys is: A-Z, 0-9, Space, Period, Comma. If you’ve got a keyboard that can produce any other single non-punctuation character, it might work, but I have no idea.
  • Keyboard shortcuts are, not surprisingly, something which can vary based on hardware. I don’t own a Mac, so this beta has not yet received any testing on that platform. The API documentation is poorly written with respect to the Command key, so reimplementing support here is a bit of a shot in the dark.
  • There is a limit of 100 keyboard shortcuts allowed at one time. The new API only technically allows updating an existing shortcut defined in the install manifest, not actually adding a new one. The obvious solution is just to add a pile of generic placeholders in there and modify as-needed. That said, if you actually manage to encounter this limit… how? Seriously, did anyone ever use hotkeys this much in Flagfox 5.2? Anyway, I expect this is plenty; just noting it here for completeness.
  • Added 2018-6-14: Icons aren’t working correctly on local raw IPs (e.g. router admin pages).

As this is a beta test, bugs are always a possibility and should be reported in a comment below or via any other contact method. Please don’t assume an issue is known unless I state so in a blog post somewhere here. I’ll update this blog post with any significant known issues discovered before posting the next beta version. Also, please only use the latest beta version, which unfortunately must be done manually due to the killed beta channel, as previously mentioned. Setting up an alternative update server is technically possible, but I don’t have any such system set up, so just using the blog is fine. You can subscribe to this blog via a link off to one of the sides of this page, if you’d like. I will also attempt to remember to post links to these blog posts on Twitter, if you’re willing to put up with whatever other crap I retweet there.

Advertisements

Flagfox 6.0.6 and 5.2.7 updates released

Flagfox 6.0.6 for Firefox 57+ has been released and is available for update and download from AMO. Flagfox 5.2.7 has also been released for Firefox 52 ESR, SeaMonkey, and Firefox forks based on older Gecko versions (or at least anything newer than Firefox 24). You can download it here.

Flagfox 6.0.6 changelog:

  • IPv4 & IPv6 address location database updates for May 2018
  • Updated Flagfox-Geotool CAPTCHA pass mechanism

Flagfox 5.2.7 changelog:

  • IPv4 & IPv6 address location database updates for May 2018
  • Updated Flagfox-Geotool CAPTCHA pass mechanism

(Same IPDB files as 6.0.x from same the build system, now updated. All other updates are exclusive to newer versions.)

The updated Flagfox-Geotool CAPTCHA pass mechanism is just a change from validating Flagfox versions to Geotool via a hash to an HMAC (a fancier hash) of the rest of the cookie. (still no user/client identifying information; no privacy policy change needed) Nobody should notice any change from this; it should just simplify maintenance of the system in the future. CAPTCHA policy is the same as it was before: the current and previous month’s Flagfox versions can use Geotool CAPTCHA-free and older versions don’t (with the current temporary exception of 5.2.3, the last 5.2.x version on AMO). Other abuse prevention mechanisms are also in place. We haven’t had too many issues as of late, so we’re hoping that people who would consider mass scraping Geotool results have just noticed it’s simpler to do it the right way and use an IP location database directly, instead of murdering Richard’s poor innocent server.

Flagfox 6.1 is still a work in progress. I’d have released a beta by now if Mozilla didn’t get rid of the beta channel on AMO. It still needs a little bit of work and testing; hopefully will be done soon. Just a reminder: Flagfox 6.1 requires Firefox 60+ (ESR).

Flagfox 6.0.5 and 5.2.6 updates released

Flagfox 6.0.5 for Firefox 57+ has been released and is available for update and download from AMO. Flagfox 5.2.6 has also been released for Firefox 52 ESR, SeaMonkey, and Firefox forks based on older Gecko versions (or at least anything newer than Firefox 24). You can download it here.

Flagfox 6.0.5 changelog:

  • IPv4 & IPv6 address location database updates for April 2018
  • Updated IPDB build system to handle new Maxmind file format
  • Updated country names list for Swaziland->eSwatini name change

Flagfox 5.2.6 changelog:

  • IPv4 & IPv6 address location database updates for April 2018

(Same IPDB files as 6.0.x from same the build system, now updated. All other updates are exclusive to newer versions.)

Future release schedule:
My extended support for Flagfox 5.2.x is scheduled to end once the current Firefox 52 ESR reaches its official end-of-life (EOL), which is currently scheduled to be in August 2018. If Mozilla’s schedule changes, I will most likely do so as well, but I don’t expect them to extend it. I plan to release Flagfox 6.1 sometime next month, at which time support for Flagfox 6.0.x will end. Flagfox 6.1 will use new APIs added to Firefox 60+, and as such will drop support for Firefox 56-59. This will create the unusual situation where the current version of Flagfox requires the absolute most recent version of Firefox, again. Fortunately, this time Firefox 60 is an ESR; no users should have any legitimate reason to continue running the dropped versions of Firefox. Of course, this plan is subject to change, as it all too frequently does.

Flagfox 6.1 will require Firefox 60+ and actually have most of its capability back

Mozilla seems to finally be getting around to implementing WebExtension APIs that they should’ve had working half a year before setting the ecosystem on fire and banning old APIs. Firefox 60 is looking to be closer to what Firefox 57 should’ve been. It’ll even be an ESR. Of important note, two very important APIs have finally been added:

  • Dynamic keyboard shortcuts – The WebExt API only allowed for static keyboard shortcuts to be specified in the addon’s built-in manifest file. Flagfox 6.0 just has a greyed-out hotkey input field in its action customization dialog, complete with the text “No Firefox 57+ support”, because this was so pathetic that I didn’t even want to hide it. All I could have was an unchangeable built-in shortcut for Geotool. I will now be able to re-implement keyboard shortcuts properly. Note that if you had custom keyboard shortcuts previously, Flagfox 6.0 doesn’t show them (because they can’t work), but they’re still saved and I should be able to revive them in Flagfox 6.1.
  • An actual DNS API – The WebExt API only provided IP addresses for uncached web requests on domains not accessed recently, and they’re only available if an addon is actively listening for them. Someone filed a bug report about web requests having blank IPs for previously seen domains around 7 months ago, but it has been largely ignored (and this change doesn’t fix that). This resulted in an inordinate number of problems and I had to write my own caching system to handle this. It’s not ideal, and I still haven’t finished improving it to handle all use-cases, as it’s a freakin’ headache. Caching things isn’t that hard; properly clearing those cached things when no longer needed, thus not creating an endless memory leak, is another matter. This was a pain to debug and the inability to get cached IPs from Firefox meant first-startup couldn’t show flags yet. Now that they finally added an API similar to what all older versions of Flagfox used, I can actually change things to be reliable again, work fully on first install/startup, and not occasionally forget flags when Firefox’s cache doesn’t agree with my cache that something was obsolete. It’s about damn time.

I’ve also seen some stuff indicating other improvements I may be able to use, but I’m not sure exactly what Firefox version they land in. The two above are the very clear big important ones, however.

Unfortunately, Mozilla killed the addon beta channel as part of their apparent quest to make developing addons more cumbersome, so doing an alpha/beta test will be a bit of a pain, this time around. I’ll look into things further and post something here at some point. ETA TBD.

Flagfox 6.0.4 and 5.2.5 updates released

Flagfox 6.0.4 for Firefox 57+ has been released and is available for update and download from AMO. Flagfox 5.2.5 has also been released for Firefox 52 ESR, SeaMonkey, and Firefox forks based on older Gecko versions (or at least anything newer than Firefox 24). You can download it here.

As a welcome bonus, new versions of addons signed and hosted by Mozilla on AMO are finally signed using SHA2-256, rather just SHA1, which is broken, and MD5, which is comically broken. It only took them… 3 years, since I filed the bug requesting this. This obviously requires the newest Firefox version to be used, otherwise SHA1 is still used (the MD5 hashes are included for no actual reason). If you don’t know what any of this means, you don’t have to; it won’t affect you in any way. Mozilla’s addon security systems are just now using something they should’ve upgraded to long ago and actually provides realistic security again. This is just your routine reminder that security is still usually legally considered to be an optional endeavour, and everything is on fire by default.

Flagfox 6.0.4 changelog:

  • IPv4 & IPv6 address location database updates for March 2018
  • Fixed actions import via drag/drop text into options
  • Added ability to import from text file via drag/drop into options
  • Files are finally now signed by AMO using a non-broken hash (SHA2-256)

Flagfox 5.2.5 changelog:

  • IPv4 & IPv6 address location database updates for March 2018

(Flagfox 5.2.5 was not affected by the text drag/drop bug. All new features are exclusive to newer versions.)

The AMO beta channel has been removed

For anyone who (actually) reads what I post here, just a quick note: Mozilla removed the beta channel from Mozilla Add-ons. (The actual timing was delayed from the date of their post. I’m not sure exactly when the change actually went live.) This means that for all addons which used this feature, they no longer have a simple method to have users test addon pre-releases via AMO. Flagfox 6.0 was my most recent use of this system, and it was invaluable. All users who had installed any beta channel version should automatically be updated to the latest stable channel version. Just to be clear, this applies to every addon Mozilla hosts on AMO, not just Flagfox.

I may do another Flagfox alpha/beta in the future, as I have done multiple times in the past, but it’ll require more time and effort, and will have a little less visibility. If/when I do so, this irregularly used blog is where I’ll announce it.

On an unrelated note: The Flagfox 6.0.x and 5.2.x monthly updates are pending, and as usual will be available at the end of the month. I’ve been considering switching from an end-of-month schedule back to a mid-month schedule, but I’ve simply not actually done so yet. Maybe probably next month.