Free

RoamSwitch Pocket

Put the CardputerZero in your pocket between public Wi-Fi and your smartphone

Pocket connects to the public Wi-Fi first, checks it, and only then opens your own WireGuard or Tailscale tunnel. Your smartphone or laptop just joins Pocket's Wi-Fi. If the tunnel drops, device traffic is stopped instead of going out.

A CardputerZero held in an airport waiting area, its screen showing RoamSwitch Pocket's protected status

Reading the radio before connecting

Even before you connect, a Wi-Fi access point announces over the air its encryption method, whether WPS is enabled, and whether it has protection against traffic tampering (PMF). Pocket reads this and shows the result on screen before connecting. An access point with the same name but a different encryption method is strongly suspected of being fake, so it is shown in red. Several access points with the same name are normal, so a different manufacturer alone does not raise suspicion.

A CardputerZero on a café table with a smartphone, a laptop and Wi-Fi signals

After connecting, Pocket checks on its own

Right after connecting, your smartphone's traffic is not passed through yet. Pocket checks DNS answers and certificates. If the answer for a well-known name has been rewritten, it shows “Danger”; if a name that does not exist gets an answer, it shows “Caution”. With a fake DNS server set up for testing, it found the tampering in 0.5–0.7 seconds.

Login pages

For pages where you only “agree to the terms of use”, Pocket presses the agree button and moves on. For pages that need input such as an email address, Pocket offers a temporary Wi-Fi that reaches only the login page, and you log in from your smartphone through it. Meanwhile, traffic to any destination other than the login page does not go out to the public Wi-Fi.

Stop when the tunnel drops

While protected, traffic from devices connected to Pocket's Wi-Fi flows only through the tunnel. If the tunnel drops, the traffic does not go out to the public Wi-Fi; it stops. The blocking is done with Linux nftables rules, and if they are changed from outside, Pocket notices within 2 seconds and restores them. Even when a device queries a DNS server of its own choosing, Pocket answers inside the tunnel. After opening the tunnel, Pocket fetches the certificates again through the tunnel and compares them with the ones it fetched directly.

DeviceSmartphone, laptop
PocketCardputerZero
Public Wi-Fi
TunnelWireGuard / Tailscale
Internet
Traffic outside the tunnel is stopped and never goes out to the public Wi-Fi

On the real device

RoamSwitch Pocket running on a CardputerZero, with the protected screen in Japanese
RoamSwitch Pocket running on a CardputerZero. The screen is in Japanese and English.

Measured results

All numbers were measured on a real device (one CardputerZero).

What we checkedResult
Detecting tampered DNS0.5–0.7 seconds
Login page that only asks you to agreePassed in about 1 second without human input
Traffic outside what is allowed that went out to the public Wi-Fi, while the tunnel was running and while it was down0 in both cases (0 for IPv6 as well)
When the rules were changed from outsideNoticed and restored in 0.3 seconds with WireGuard, 1.7 seconds with Tailscale
Smartphone speed through the tunnelWireGuard down 11.8, up 11.0 Mbps
Tailscale down 11.4, up 9.21 Mbps
BatteryProtected, 1 device, average 0.88 W over 15 minutes. About 6 hours expected

Speeds were measured with a speed test in the smartphone's browser, in an environment where the upstream Wi-Fi alone gave about 29 Mbps down and about 21 Mbps up.

Keys never leave the device

Pocket generates its WireGuard key pair internally and never lets the private key out. The public key to register on your server is shown on screen as a QR code. Scanning the “Guide” QR code on the screen with your smartphone opens a page explaining how to send the configuration from a PC over SSH. For Tailscale, you scan the login QR code on the screen with another device and choose an exit node from the list.

WireGuard setup guide

A key in a glass box, with a CardputerZero next to it

Take it with you

The connection to the public Wi-Fi and the Wi-Fi for your devices run at the same time on a single radio. The name and password of the Wi-Fi for your devices change every time you use it, and you connect by scanning the QR code on the screen with your smartphone camera.

A CardputerZero placed on a smartphone in an open travel bag in a hotel room

What you need

  • M5Stack CardputerZero (the Lite version without a camera also works)
  • Your own WireGuard server, or a Tailscale account and an exit node
  • A Wi-Fi network the device connects to first (used during installation)

How to install

Install both the screen app and pocket-core, which handles networking, with apt. pocket-core uses the Tailscale package, so first add Tailscale’s apt repository and the RoamSwitch apt repository.

curl -fsSL https://pkgs.tailscale.com/stable/debian/trixie.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/debian/trixie.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
curl -fsSL https://lafine.net/apt/roamswitch-archive-keyring.asc \
  | sudo gpg --dearmor -o /usr/share/keyrings/roamswitch-archive-keyring.gpg
echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/roamswitch-archive-keyring.gpg] https://lafine.net/apt stable main" \
  | sudo tee /etc/apt/sources.list.d/roamswitch.list
sudo apt update
sudo apt install roamswitch-pocket-core roamswitch-pocket
sudo reboot

After rebooting, open “RoamSwitch Pocket” from the launcher and set a PIN.

Tunnel setup, everyday use and troubleshooting are in the RoamSwitch Pocket manual.

FAQ

Does Pocket send anything to a server?

For its checks, it connects to well-known public hosts (Google, Cloudflare, Wikipedia and Quad9 DNS). It never sends check results or usage records to our servers.

Can I use IPv6?

While protected, all IPv6 is stopped and only IPv4 is passed through the tunnel.

Can I connect devices over USB or Bluetooth?

Through Pocket's Wi-Fi, or with a USB cable (tested with a Mac). Bluetooth is not supported.

Where is the PIN stored?

The PIN itself is not stored. Pocket derives a key from the PIN with Argon2id, encrypts the WireGuard private key with it, and keeps the result in a file that only root can read.

Can I control it over SSH?

Yes. From a computer, ssh -t <user>@<address> pocket-tui gives the same controls as the screen app. It shows URLs and values as text instead of QR codes.

Troubleshooting and what this version cannot do are in the manual.

M5Stack and CardputerZero are trademarks or product names of their respective owners. RoamSwitch Pocket is not an official M5Stack product.