Problem 3: However, having a list of IPs and access to web requests (the listener is simple) is not enough.
As browsers are too high-level, we only get the URL/domain here. However, we need to get the IP here.
Fortunately Firefox (only!) has an API: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/dns/resolve
Problem 4: Having all that, we should be done, should not we? Well… no! I still hear nothing!
Playing a sound was surprisingly difficult, given browsers usually now limit that websites (browser extensions are basically websites) should not play a random sound out of nowhere.