Portway

Use a phone as a mouse and keyboard for a Linux machine. Portway serves the controller over the local network and sends input through /dev/uinput.

platform
Linux
language
Rust
version
0.1.0
license
MIT
source on GitHub
Input path

What it does

Portway runs a small server on a Linux machine and serves its own phone controller. After pairing, the browser sends pointer and keyboard events over a WebSocket. Portway turns those messages into kernel input events through /dev/uinput; it does not need an X11 or Wayland-specific input API.

Install

The installer is intended for conventional systemd distributions. It creates an unprivileged service account, configures access to /dev/uinput, and enables Portway at boot.

shell
git clone https://github.com/heptanal/portway.git
cd portway
cargo build --release --locked
scripts/install-linux

NixOS users can use the package and NixOS module included in the repository instead of the installer.

Pairing and security

Portway listens on 0.0.0.0:2721 by default. That makes it reachable from the LAN, but potentially from any other network attached to the host as well. Authentication is required by default; plain HTTP still leaves pairing codes and input unencrypted.

Use it on a trusted network, restrict the port to the intended interface, or configure HTTPS. The normal service should not run as root. Access to /dev/uinput is enough to synthesize input and should be treated accordingly.

security model · HTTPS setup

Limits

More