Repository navigation
Strait 0.6.0
What is new
A second security round. It closes the items that 0.5.0 left open or only partly fixed. Hosts and guests both need 0.6.0: personal invites made with 0.5.0 stop working, and the command line no longer takes an invite as an argument.
Privileges
- On macOS and Linux the window runs as your user. Sharing needs no password at all; a guest's full tunnel asks for it once per connection, and only the tunnel runs as root.
- The root process writes its log only into a folder it creates itself (
/var/run/strait/<uid>), never into your folders, and gets only the rendezvous and carrier choices from the window, never a path to another program.
Personal invites
- Change every invite (People, while sharing) stops sharing and starts again with a new invite. Every old invite stops working, personal ones too, so a removed person no longer has any key at all.
- A personal invite works on one device at a time: a copy is refused while its owner is connected.
Other fixes
- A guest accepts only replies from the host: a host can no longer open connections to services on the guest's computer (file sharing, SSH, a development server). Ping still works.
- Forward mode: an idle guest sends a keepalive every 10 s, so a quiet connection keeps its session and another guest cannot take it over.
- The WebSocket transport's TLS is tied to the host key in the invite: holding the invite is not enough to pose as the host there either.
- The command line refuses an invite or key given as an argument, where every user of the computer can read it. Use
STRAIT_INVITE, or--invite -to read it from standard input. - A guest scans one address at most 3 times an hour (the port scan a symmetric NAT needs).
- Windows switches IPv6 off on every adapter during a full tunnel, not only the main one. macOS adds IPv6 reject routes that router advertisements cannot replace.
- Android: the tunnel core checks that the app handing over the VPN interface is its own, under a fresh random name each session.
- The mobile app no longer offers trackers, like the desktop app.
Formal model
- A ProVerif model of the join (docs/proverif) proves that the guest's token and traffic stay secret against an attacker who holds the invite, and that a guest that finishes a join talked to the holder of the host key.
Repository
- docs/SECURITY_MEASURES.md: every security measure, the attack surface, and what each side (host, guest, everyone else) can and cannot do.
SECURITY.md(private reporting is on),CONTRIBUTING.md, issue templates, CI, screenshots and a comparison with other tools in the README.
Design and limits: docs/HANDSHAKE.md.
Install
| System | File | How |
|---|---|---|
| Ubuntu / Debian, Intel/AMD | strait_0.6.0_amd64.deb |
sudo apt install ./strait_0.6.0_amd64.deb, then open Strait from the menu |
| Ubuntu / Debian, ARM | strait_0.6.0_arm64.deb |
same, with this file |
| macOS, Apple silicon and Intel | strait-0.6.0-macos-universal.dmg |
drag to Applications, right-click and choose Open the first time |
| Windows 10/11 64-bit | strait-0.6.0-windows-x64.zip |
unzip, keep Strait.exe and wintun.dll together, double-click and accept the administrator prompt |
| Other Linux | strait-0.6.0-linux-x64.tar.gz, strait-0.6.0-linux-arm64.tar.gz |
./nat-tunnel gui |
Tested
AWS lab: Linux machines behind a regular NAT, a symmetric NAT and an address-dependent NAT in three regions, two public Linux hosts (arm64 and x86-64), and a Windows Server 2022 machine.
Security, against a live host:
- Invites (10 of 10 checks):
- an invite without
hkand one with a damagedhkstop at once with a clear message; - another host's key cannot join;
- a personal-only host refuses the shared invite and admits a personal one;
- a withdrawn personal invite is refused after a host restart, while another person's still works;
- a copy of a personal invite is refused while its owner is connected, and the owner's session stays up.
- an invite without
- What a guest can reach (kernel and userspace exit): the internet with the host's address. Mail port 25, the host's public, tunnel and LAN addresses, the host's cloud DNS and other guests are refused; ping to the host works.
- What a host can reach on a guest: with 0.5.0 a test web server and SSH on the guest were reachable through the tunnel; with 0.6.0 both are refused, and ping still works.
- Forward mode: a second guest was refused 24 times while the first guest's only connection sat idle for 75 s, and that connection still worked afterwards.
Connections:
- Host with a public address, guests behind three NAT types: 12 of 12 connections (UDP, Shadowsocks, WebSocket, obfuscated UDP), 0.5 to 1.1 s, 0% loss.
- Hosts behind NAT with no address in the invite, found through Nostr, MQTT and ntfy: 17 of 20. The three failures are WebSocket with a symmetric NAT on one side, the known limit below. A symmetric-NAT host takes 26 to 59 s.
- Key rotation: 290 s at 20 Mbit/s, 0% loss.
- Traffic-shape filter on the guest's router: same results as 0.5.0. Level 3 lets UDP, Shadowsocks and obfuscated UDP through (46 to 80 Mbit/s); level 4 blocks all four tested transports.
Windows:
- Windows guest from the release zip: 275 Mbit/s. In a full tunnel its traffic leaves from the host's address, IPv6 is off on the network adapter during the session and back on after it.
- Linux guest through a Windows host: it leaves from the Windows address.
Packages and tests:
- Ubuntu packages (x86-64 and arm64): install, report 0.6.0 and open the window on a virtual screen.
- macOS disk image: signature verifies, both architectures run, and the app opens as the user with no administrator prompt.
- 591 unit and integration tests pass; ProVerif proves every property in the model.
Not tested / known limits
- The macOS password prompt for the new privileged tunnel, the Linux
pkexecprompt, and the Windows window on a real desktop. These need a person at the screen. - The Android changes were compiled but not run on a phone, and the mobile test suite was not run.
- No kill switch: if Strait stops, traffic uses the normal connection again.
- WebSocket hole punching does not work through a symmetric NAT.
- A malicious host can point its guests' port scan at an address of its choice, within the limits above.
- A copy of a personal invite works while its owner is offline.
- No outside party has audited the design.
- The apps are not notarized or code-signed, so macOS and Windows show a warning on first open.
- No Android or iOS build in Releases yet.