Skip to content

Onion rewrites should add eTLDs

If we want to extend the possibility to add custom *.tor.onion (or some similar domains) in runtime, we should hack somehow nsEffectiveTLDService.

This feature is very important: it is used to split domains when scoping whatever needs to be domain-scoped (e.g., cookies). So, I expect it to be critical for FPI.

Actually, nsEffectiveTLDService already has a mechanism to update public suffixes, that we patch out (#40073 (closed)). But it uses some non trivial binary format that encodes a deterministic acyclic finite state automaton. This format is explained in xpcom/ds/tools/make_dafsa.py (the code itself is about ~200 Python rows).

If the only reason for #40073 (closed) to exist was our changes to the list, we could restore it, and find some way to inject our additional domains at every update of the automaton.

@JeremyRand was suggesting to use some prefs.

I also thought of adding some other methods to the IOnionAliasService interface that we implemented for #40458 (closed).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information