Autonnel v1.7.0
← Marketplace
Cloaking menu in the Autonnel admin, Pages tab: three pages with their cloaking state (Active, Monitor only, Off), rule set count, destinations and diversions in the last 24 hours

The Traffic Cloaking plugin decides, per page, whether a visitor sees the page itself, another published page or an external https URL. The decision is made from rules you write, and every diversion is logged.

It adds a Cloaking menu to the admin sidebar with three parts: pages that have a config, shared rule sets, and a decision log.

Screenshots

Page cloaking drawer in the Autonnel admin: enabled switch, selected rule sets, destination for matching visitors, destination for everyone else and the fail-open setting
Per-page settings: rule sets, where matching visitors go, where everyone else goes, and what happens if the check fails.
Rule set editor in the Autonnel admin: two rules with user agent conditions, enable switches and a start-from-template picker
Rule set editor: conditions inside a rule are ANDed, rules are ORed, and starter templates are copied in.
Cloaking decision log in the Autonnel admin: each diversion with time, page, matched rule set and rule, visitor ASN and where the visitor was sent
Decision log: every diversion with the rule that matched, the visitor ASN and the destination.

Screenshots are the plugin running in a fresh Autonnel admin with sample pages. The diversions in the log were produced by real requests to those pages, using the starter rule sets. Page names, domains and traffic are fictional.

Who it's for

  • Advertisers who need to show a different page to ad-platform reviewers, crawlers or specific networks.
  • Teams that want to see which traffic matches a rule before moving anyone, using monitor mode.

What's included

  • Per-page config: enabled flag, the rule sets it uses, a destination for visitors matching any rule, a destination for everyone else, and an onError behaviour.
  • Rules on ASN, IP (exact or CIDR), country, user agent, referer, path, one query parameter, or the set of parameter names. Conditions inside a rule are ANDed, rules are ORed, and there is no regex operator.
  • Shared rule sets, with starter templates that are copied in when applied and never linked back.
  • Monitor mode: with no destination on either side, rules are evaluated and matches are logged, nobody is moved.
  • Decision log of every diversion, pruned after 30 days.
  • Fails open: errors let the visitor through unless the page sets onError to divert.
  • Its own permissions, cloaking (read) and cloaking.edit (write), granted per role in Settings, Permissions; only the admin role has them by default.

Specifications

npm package
@autonnel/plugin-cloaking
Version
0.1.0
Requires
autonnel >=1.7.0
Routes added
/cloaking, /api/cloaking/*
Database
Tables created by pnpm db:push in the deployment
Licence
Autonnel Marketplace Commercial License (LICENSE file in the package)

Install

After purchase, install with the CLI (see CLI install):

npx autonnel install @autonnel/plugin-cloaking

Then register it in astro.config:

import { cloakingPlugin } from '@autonnel/plugin-cloaking';

autonnel({ plugins: [cloakingPlugin()] })

Run pnpm db:push, grant the cloaking permissions to the roles that need them, then open Cloaking in the sidebar and add a page.

FAQ

How is the visitor ASN determined?

On a Cloudflare Worker deployment it is read from request.cf.asn, which the runtime sets. Elsewhere it comes from the zx-ipasn request header, which a Cloudflare Transform Rule must write on every zone and which is trusted only together with cf-ray. The console warns when a host has neither.

Does tracking run for visitors sent to an external URL?

No. An external destination is answered before the page renders, so no client-side tracking runs for those visitors. Parameters are forwarded to the target when forwarding is on, which is the only attribution that survives the hop.

Does it proxy the target page?

No. There is no proxy mode; the visitor is redirected to the destination.

What happens if the plugin errors?

It fails open and the visitor sees the page, unless the page sets onError to divert.

Changelog

0.1.0

  • Initial release: per-page rules, shared rule sets, monitor mode, decision log.