Probe the gaps safely
Testing a gambling blocker has a trap built in: the obvious test is to visit a gambling site and see whether it loads. For the person the blocker protects, that test is the very thing to avoid. Every check here works with reserved test names and simulated time, never with a real operator.
Test with reserved names instead of real sites
The names ending in .test, .example and .invalid are reserved and will never resolve to a real service. Put two or three of them in the blocklist permanently, alongside the real entries, and use only those in tests. If www.example-casino.test is refused and allowed-site.example is not, the matching and interception layers work, and nobody has had to look at a betting page to prove it.
Ask the person the blocker protects to step away while you test if you are building for someone else, even with reserved names. The pause page and the mechanics of bypassing are themselves triggers for some people.
Probe each bypass on purpose
The gaps you listed on the scope page are the test plan. Work through them deliberately, record the result, and decide again whether each one is closed by code, closed by a person or accepted.
| Check | How to probe it | Pass condition |
|---|---|---|
| Subdomain | Request a.b.example-casino.test | Refused by the matching function and the live layer |
| Letter case and trailing dot | Request EXAMPLE-CASINO.TEST. | Refused; normalisation handles both |
| Lookalike letters | Add a punycode test entry and request its Unicode form | Both forms are refused |
| Second browser | Open a reserved test name in a browser without the extension | Refused only if a hosts or DNS layer exists; otherwise record as accepted or closed by a person |
| Private window | Open a private window and request a test name | Refused; extension is allowed in private mode or a lower layer catches it |
| Encrypted DNS in the browser | Enable the browser's own encrypted DNS setting and request a test name | Refused by the extension even though the hosts file is skipped |
| Mobile data | Switch the phone from home wifi to mobile data | Refused by an on-device layer; a router-only setup will fail here |
| Disable request | Request a disable, then check immediately and after simulated time | Still enabled immediately; disabled only after the cooldown |
Simulate time rather than waiting for it
const start = 1_000_000;
let s = { enabled: true, disableRequestedAt: null };
s = requestDisable(s, start);
console.assert(s.enabled === true);
s = requestDisable(s, start + COOLDOWN_MS - 1);
console.assert(s.enabled === true);
s = requestDisable(s, start + COOLDOWN_MS);
console.assert(s.enabled === false);
Also test the cancel path: a request followed by a cancellation followed by a new request must restart the waiting period from the second request, not the first.
Log decisions, not browsing
A dry-run mode, in which the blocker decides but does not refuse, is the fastest way to find false positives before they frustrate someone into uninstalling it. The temptation is to log every URL the person visits. Resist it. A log of someone's browsing is sensitive data, and a blocker that keeps one becomes a surveillance tool rather than a safeguard.
- Record counts: how many requests were refused today, and by which rule. That is enough to see whether the blocker is active and whether a rule is noisy.
- Record the matched list entry, not the full URL. The entry already tells you which rule fired.
- Keep logs on the device, keep them short, and let the person clear them.
- Never send logs anywhere by default. If a second person wants to see activity, agree that explicitly and keep it to counts.
Maintain the list without weakening it
Blocklists age. Operators add mirror domains, and a list that is never touched slowly loses coverage. At the same time, every edit is a chance to quietly remove an entry. The arrangement that handles both is to allow additions freely and to route removals through the same waiting period as a disable request, with the key holder reviewing the diff.
- Keep the blocklist in version control so every change has a history that both people can read.
- Treat additions as low risk: anyone may add a domain at any time.
- Treat removals and whitelist entries as high risk: they wait the full cooldown and need the key holder's confirmation.
- When merging a public list, review it in chunks and keep the reserved test names at the top so tests keep passing.
- After any update, rerun the bypass checks above. A regenerated rule set can silently drop the subdomain prefix or the test entries.
Updates to the browser or operating system can also change what an extension or filter is allowed to do. A short monthly check of the test names is a cheap way to notice before the person does.