logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git

BadWolf, one year later.xhtml (5867B)


  1. <article xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="h-entry">
  2. <a href="/articles/BadWolf%2C%20one%20year%20later"><h1>BadWolf, one year later</h1></a>
  3. <h2 id="badwolf-1year-history">Bits of History and Present</h2>
  4. <p>A bit more than a year ago I started writing my own browser based on WebKitGTK, which I named Badwolf (the name is actually from ~2013, similar project but it didn't went far). I quickly ended up using it as a daily driver, before it was even ready for that in my opinion but I was left with no choice simply because rustc is a pain to compile (I love having to do handpatches…) and that's needed for firefox to compile (which is also painful), and chromium taking 11+ hours to compile (with often having to resume it because it would have got OOM-Killed) was just a major pain, meanwhile WebKitGTK takes about one hour to compile on my desktop or laptops (yeah even the one with an Intel i3 first-gen).</p>
  5. <p>In the meantime I done an archlinux chroot for some painful programs to go in (Firefox, Chromium, LibreOffice, Steam), but other than the very rare broken website I don't use it (and I'd rather use another distro in that chroot). Not even for tests as I don't do much of frontend and I don't really use modern HTML features anymore in my website.</p>
  6. <p>It made me drop a bunch of the stuff I had on Firefox/Chromium:<ul>
  7. <li>HTTPS Everywhere+Smart HTTPS: Yet to be replaced</li>
  8. <li>Certificate Patrol (basically TOFU in the browser): Yet to be replaced</li>
  9. <li>uMatrix: for now just a javascript toggle (which webkit cleanly provides to me)</li>
  10. <li>uBlock Origin: Replaced with <a href="https://github.com/jun7/wyebadblock">wyebadblock</a> which basically just misses CSS filters (could I could consider a feature)</li>
  11. <li>Adobe EME / DRMs: None 😄</li>
  12. <li>Any kind of calling home / Telemetry: None 😄</li>
  13. <li>PassFF (hook to <a href="http://password-store.org/">pass</a>): Yet to be done, I'd rather wait for <a href="https://git.sr.ht/~sircmpwn/himitsu">~sircmpwn/himitsu</a></li>
  14. <li>Popup blocking: popups are just opened in a new background tab, could get some blocking</li>
  15. </ul></p>
  16. <p><strong>But!</strong> In my opinion WebKit is already much better than Firefox at privacy, for example ephemeral sessions (hardcoded mode in badwolf) will save absolutely nothing to the disk, which is something that is quite how Apple (or at least their employees) seems to want in a browser anyway. Mozilla could try to dance around with finally picking some of the modifications done in the Tor Browser but as far as I can tell there is still very large differencies between the two.</p>
  17. <p>As far as RAM usage goes… well it's a modern web browser so it'll eat whatever is available, a laptop with 4 GB seems to still be quite confortable with it, WebKit seems to not clean up WebKitNetworkProcess when I close a tab but it's basically the only thing that stays so I can just close a bunch of tabs and get back some percents of memory. (and after something like 2 months close some windows) I haven't needed to put my browser in a cgroup to limit it's memory usage like I still do with firefox/chromium.<br />
  18. On the other hand, startup time is so fast that I don't feel the need to have <code>badwolf [url…]</code> commands try to hook to an already running session. I litterally just spawn a new one for each link in my RSS/Atom feed and it's fast enough on my desktop with some quite slow (but reliable) SATA 1 HDDs.</p>
  19. <p>On the developer side of things: WebKitGTK is unusable with overcommit disabled thanks to GLib (it's calling <code>abort()</code> when <code>malloc</code> returns <code>NULL</code> which is great as it kills the whole browser when doing stuff like opening a new tab…), can't be fixed now because that would break the ABI/API because some parts are no return value, this is why you should use <code>int</code> which is the default as a return value and one that you should use unless you're absolutely sure that it will never fail.<br />
  20. Linux maintains bugs because the userland also does so…</p>
  21. <h2 id="badwolf-1year-future">Future</h2>
  22. <p>BadWolf 1.0.0 should arrive soon™, main blocker is documenting the interface so it can be properly put as stabilized. I'll also try to finish installing SourceHut on my setup so I at least get a tracker and CI from it.</p>
  23. <p>Suggestions based on Bookmarks have been done in a branch but it's a pain to make it work in multiple tabs and I get a crash deep into GLib when 2+ tabs are opened and I close one. Anyway, I will also write a standalone bookmark editor at some point, probably using GTK so I could also spawn it into badwolf.</p>
  24. <p>History should also be done at some point, it'll be properly isolated from WebKit to not lower the privacy. Only issue is a code-design/tools one so far, I wish to have the data saved into flat files with a separated index, I could try to write an agent(for multi-processes) and use SQLite but I'd rather avoid it because the data would be very close to a binary blob.</p>
  25. <p>Proper configuration (with profiles/presets) is something that could be nice to have, I'm not a huge fan of putting the configuration in a C header, probably will also add some command lines options to change some settings (like javascript).</p>
  26. <p>Download overview tab has been done, needs a bit more work but it's close to ready for production use.</p>
  27. <p>And that's basically it, Minimalism is already an existant feature, let's try to keep it, WebKit already has extensions, I will maybe add some public API that you could use for the browser-specific parts but that's basically it.</p>
  28. <p><a href="https://queer.hacktivis.me/objects/aba8f452-5f72-43d7-88ab-a164228a9d31">Fediverse post for comments</a>, published on 2020-04-17T10:31:00Z, last updated on 2020-04-17T12:36:00Z</p>
  29. </article>