Shadowing rules

The separate rule family that decides who may view or control a signed-in desktop session on which device, and whether the person at the device is asked first.

Updated · ·By Ivan Vyshniak

Nothing on this page changes with your selection.

Shadowing lets one member view, and optionally control, a signed-in desktop session on another device. It is governed by its own rules, in the shadowing section of the access policy. Traffic rules and shadowing rules are independent: a traffic rule that allows RDP does not allow shadowing, and a shadowing rule opens no ports.

Two switches must both allow it

  1. Allow shadowing is on for the network: Settings → Device Management → Allow shadowing. It is on by default. Turning it off blocks shadowing network-wide and ends sessions in progress.
  2. A shadowing rule matches the viewer, the target device and the session the viewer asked for.

The default rule

New networks include one shadowing rule:

Default shadowing rulejson
{
  "name": "Default allow all",
  "description": "Allow all devices to shadow each other",
  "source": ["*"],
  "destination": ["*"],
  "allowed_sessions": ["*"],
  "control": true,
  "consent_required": true,
  "enabled": true
}

It lets any member's device shadow any session on any device, with control, after the person at the target accepts a prompt. Replace it with narrower rules once you know who needs shadowing.

Edit shadowing rules

Open Access → Shadowing. Each rule has these fields:

Editor labelJSON fieldDefaultMeaning
Namename""A label for the rule.
AccesscontrolfalseView only (false) or Full control (true).
Descriptiondescription""Free text.
Operatorssource[]Who may shadow: *, tag:, role:, group:, email:, client: or ip: selectors.
Devicesdestination[]Which devices may be shadowed, with the same selectors.
Allowed sessionsallowed_sessions[]Which sessions on the device may be shadowed. See below.
Consentconsent_requiredfalseAsk for consent (true) or Start instantly (false).
—enabledtrueSwitch a rule off without deleting it.

Use Move up and Move down to order rules, then click Save shadowing rules. Editing requires the Owner, Admin or Network admin role.

The JSON also accepts allowedSessions and consentRequired. Saved documents always use allowed_sessions and consent_required.

New rules start without consent

A rule you add in the editor starts as View only with Start instantly selected. Choose Ask for consent if the person at the device should approve each session.

Allowed sessions

allowed_sessions is matched on the target device against its own operating-system accounts, not against Peerlify identities. Three forms are meaningful:

EntryMatches
*Any signed-in session.
group:<local group>Sessions whose user belongs to that group on the device, for example group:Administrators. On Windows this includes domain groups in the user's token.
An account nameThat account, matched case-insensitively as DOMAIN\name or just name.

Spaces and dashes are treated alike, so group:Remote-Desktop-Users matches the Windows Remote Desktop Users group. The editor converts spaces to dashes as you type.

An empty list matches no session at all, so a rule without allowed_sessions can't be used. Saving a rule fails if an entry starts with tag:, client:, ip: or email:. Other entries that look like network selectors, such as role:admin, are accepted but never match.

How a request is decided

When a viewer asks to start a session, the target device checks, in order, and stops at the first failure:

  1. Shadowing is supported on this device. Linux devices always refuse.
  2. Allow shadowing is on.
  3. A rule matches: the first enabled rule, among those whose Devices include this device, whose Operators include the viewer.
  4. The requested session exists and has a signed-in user.
  5. The session's user is covered by that rule's Allowed sessions.
  6. If the target is a Mac, which sends video, the viewer's app can decode it.
  7. On a Mac, the person has set up shadowing and granted Screen Recording.
  8. If the rule asks for consent, the person at the device accepts within 30 seconds.

Two details:

  • First match, not best match. A broad rule placed above a narrow one decides every request that both match. Put the most specific rules first.
  • Control needs both sides. The viewer gets control only if they choose Control when starting and the rule grants Full control. Asking for control under a view-only rule starts a view-only session.

While a session runs

The target device re-checks live sessions every 2 seconds. A session ends if Allow shadowing is turned off, the rule no longer matches the viewer or the session's user, or the user signs out.

Changing a rule from Full control to View only drops a running session to view: anything held on the target is released, clipboard sharing, audio and file transfers stop, and the viewer is told why. On a device running an older version, the session ends instead. Adding consent does not affect a session already in control, and applies the next time a session on that device asks for control.

A shadowing rule makes the target visible

If a shadowing rule lets you shadow a device, that device appears in your peer list (and, on Windows and macOS, resolves by name) even when no traffic rule lets you connect to it. This is how the desktop app offers it in Peers. It does not let you open any connection to it.

Next steps

Was this page helpful?