11
votes
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
I'm working on sandboxing content processes in Firefox for Android.
When it comes to web browsers, adding the code to actually do the sandboxing is easy; the hard part is adapting the rest of the browser's code to be aware of it.
Essentially, there are many components in the browser that were written for a pre-sandboxing universe. These components expect to be able to talk directly to the OS, and potentially to other processes, without hindrance. As we make the sandbox stricter, we need to modify those components to work differently. Often times this involves changing the affected components so that, when running as sandboxed content, they communicate with their counterparts in the parent process to do work on their behalf. In Mozilla parlance, we refer to the procedure of modifying these components as "remoting."
Awesome. I love the new Firefox for Android, by the way. Seems to get a lot of undeserved hate, but it works great for me, and I've been using Firefox on Android for several years now.
❤️
Whoa, that's crazy! Do go on, if you don't mind.
Have you forked the Android code and you're compiling FireFox and side-loading it? Or is this some sort of integration with the published builds?
As @hungariantoast said, I work on Firefox professionally, so making it sandboxed is part of my day job.
Sandboxing an app does not require us to do anything to Android itself; it's essentially just turning up various dials that Android already makes available to us. I've essentially split this project into two stages:
isolatedProcess
attribute, which causes Android to remove access to a bunch of IPC and system services. It's just a simple change to our application manifest to turn this on, however as I indicated in my previous post, the hard part is getting the Gecko content processes to work correctly in such an environment.seccomp-bpf
-based sandbox, similarly to the one we use for desktop Linux. The restrictions in this sandbox will be even tighter thanisolatedProcess
, so we're expecting to need to do additional work on Gecko to get it working there.The good news is that the cross-platform code in Gecko is already mostly sandboxing-compliant thanks to the work that has already been done for Firefox desktop; the issues that we need to fix are in Gecko's Android-specific code.
Currently working on a graphical Gemini client because apparently I didn't learn my lesson last time.
https://sr.ht/~admicos/moonlander
Obligatory Screenshot
At the time of writing it's pretty "half-baked" and not daily-driver ready just yet, but it's definitely more promising than my previous attempt. The main difference between them being that I am not trying any custom drawing magic anymore, and instead (ab)using some GTK features to achieve the fancy looks I am after.
The biggest issue I have currently is that I have no idea how TLS works, so I don't know if my TOFU implementation is secure. I use
rustls
to deal with most of the TLS mess, but I needed to write a custom certificate verifier because it doesn't support the "trust on first use" system Gemini uses.On the verifier, I am currently ignoring TLS v1.2/v1.3 signature verification, which I have no idea how to do manually, and wasn't able to find any sane documentation about it. The few pieces I have found suggest it requires the use of certificate authorities, which aren't relevant to TOFU, so I don't exactly know how to proceed, even if it was false and they were relevant I have no idea how to implement them.
Right now I am just making it succeed unconditionally.
rustls
has a default implementation for them I could use, but it breaks connection with some servers (particularly mine, something about certificate versions and subject alternative names I think), and that's why I am in this mess right now.Any TLS wizards, the relevant code is here and any help is appreciated.
What inspired you to write a gemini client? What do you like about Gemini? And what future feature are you most excited to implement in the client?
Most of the existing clients weren't "fancy" enough (as in, didn't render pages how I wanted), and knowing one of Gemini's goals was being simple to implement, I decided to go make my own client.
No third party requests, no JS (or equivalent), it's pretty lightweight and does the job of "reading text" really well. The community is also pretty good too.
I'm mostly looking forward to it being usable (by me, at least), as in, when I want to look at Gemini, I want to open up Moonlander instead of a different client. It's almost there, though there are a few things I need to work on still.
Other than that, not sure, really.
Update: Pre-built binaries are now available (Linux only, see the original link), so why not give it a spin?
I do something kinda like a dev-log but more arbitrary over on Mastodon. If that interests you, check it out: https://mastodon.social/@admicos
I ended up doing a bunch more work on my various map projections.
For the polyhedral projections, I implemented the 5 platonic solids, and made it so you can progressively subdivide them to more closely approximate a sphere. I also added code to allow you to rotate the map around without moving the faces so you can make the continents line up more optimally with the faces.
Then I went and implemented a bunch of azimuthal projections. I started with the "Little Planet" projection because I've seen it used a lot in artwork. But I found some really interesting ones like Azimuthal Equidistant and Lambert Equal Area. Both of these project the entire globe (minus the point on the opposite side) onto a circle, so you can see all the continents at once. I also implemented the quirky Peirce Quincuncial projection. I do not understand the math at all, but I found an implementation on the web and adapted it for fun. I just love the idea of literally fitting a round peg into a square hole mathematically.
I've been working on my map editor. https://github.com/Apostolique/Apos.Editor It's now at a really nice spot. To recap the main features:
Now that I have all that in place, I started finalizing my UI library. https://github.com/Apostolique/Apos.Gui This is what I'll be working on for the rest of the week. I'll have to write some docs and hopefully next week I can release a new stable version.
Here is an example UI snip. The code for that looks like:
This supports reparenting UI components. That means a components gets teleported to a different parent.
I've been streaming almost every day to https://glimesh.tv/Apos. I'm liking the site so far. It's using the FTL protocol which is insanely fast. If I watch my own stream and I talk there is barely any echo. It's still small but they are working really fast to fix all the bugs. I had an issue the other day, I got a response within 20 seconds and it was fixed within 40 seconds. (My stream was shown as live even though I was done streaming.) Then a full site fix was done before the next day.
I worked on many other projects, but those are the ones I'm most proud of.
chromecast_mpris
is a daemon for controlling Chromecasts from Linux that I've added a few new features to, including a new dark mode icon and support for displaying more metadata. Having trouble replicating this issue, though. Also, I found out that Linux Uprising took the time to write aboutchromecast_mpris
, which is pretty cool.I added an async API to
play_sounds
and better support for making sure that spawned player processes are killed when the parent process doesn't shut down cleanly.play_sounds
provides a simple API over the cross-platform idiosyncrasies that Python's sound playing ecosystem presents.I'm writing documentation and fixing bugs on
aiopath
, an asyncpathlib
replacement for Python.