Checks

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.

Rule: never load a real gambling site to testTools: reserved domains, a dry-run mode, a clock you control

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.

Bypass checks and what a pass looks like
CheckHow to probe itPass condition
SubdomainRequest a.b.example-casino.testRefused by the matching function and the live layer
Letter case and trailing dotRequest EXAMPLE-CASINO.TEST.Refused; normalisation handles both
Lookalike lettersAdd a punycode test entry and request its Unicode formBoth forms are refused
Second browserOpen a reserved test name in a browser without the extensionRefused only if a hosts or DNS layer exists; otherwise record as accepted or closed by a person
Private windowOpen a private window and request a test nameRefused; extension is allowed in private mode or a lower layer catches it
Encrypted DNS in the browserEnable the browser's own encrypted DNS setting and request a test nameRefused by the extension even though the hosts file is skipped
Mobile dataSwitch the phone from home wifi to mobile dataRefused by an on-device layer; a router-only setup will fail here
Disable requestRequest a disable, then check immediately and after simulated timeStill 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);
Because the disable function takes the clock as an argument, three days pass in three lines.

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.

  1. Keep the blocklist in version control so every change has a history that both people can read.
  2. Treat additions as low risk: anyone may add a domain at any time.
  3. Treat removals and whitelist entries as high risk: they wait the full cooldown and need the key holder's confirmation.
  4. When merging a public list, review it in chunks and keep the reserved test names at the top so tests keep passing.
  5. 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.