demo · v143

Remote desktop relay

The use case cited in the Web Smart Card explainer: a browser-based remote desktop relays APDUs between the remote machine and the host's locally-attached card reader. The remote PC/SC app thinks the reader is directly attached. Visualised end-to-end.

policy requirednavigator.smartCard is gated to Isolated Web Apps with the smart-card-connect policy. The page renders the relay diagram regardless and lets you craft APDUs.

1. remote PC/SC app

Pick an operation and click Send.

2. relay tab (this page)


      

3. local browser via navigator.smartCard


      

4. host's card reader


      

the call

// In the relay tab (after the IWA grant):
const ctx = await navigator.smartCard.establishContext();
const { readers } = await ctx.listReaders();
const conn = await ctx.connect(readers[0], "shared", { preferredProtocols: ["t1"] });
const resp = await conn.transmit(apduFromRemote);
sendToRemote(resp);  // wrap and forward via WebSocket / WebRTC

why this angle

The other concept shows the API call chain. This one shows the relay-shaped end-to-end use case the explainer was built around — Citrix-style remote desktop, where the host's smart card reader is exposed to the remote session. Cards can't be virtualised easily; this API made it possible without a browser extension.

see also