Repository navigation
Strait 0.5.0
What is new
This release is about security. It answers an outside review of the handshake and two internal reviews of the whole codebase. Invites from earlier versions no longer work: hosts and guests both need 0.5.0.
Who you are talking to
- Every host has its own long-term key, and every invite names it (
hk=). A guest refuses an invite without one, so holding an invite is no longer enough to pose as the host. - Guests join through a Noise
NKpsk0handshake. Each session has fresh keys, and both sides replace them every two minutes. - The host signs its rendezvous records. Guests ignore unsigned addresses for scanning, and the host only fires at sealed guest records.
People
- Personal invites: one per person. You see who is connected and can remove one person without stopping the others.
- A removal is remembered after the app restarts. While a removed person's invite is still valid, the shared invite stays closed.
What a guest can reach
- Only the public internet over IPv4. Not the host itself (its own addresses, its tunnel address, its router's public side), not its LAN, not other guests, not cloud metadata and platform addresses, and not mail port 25.
- A guest also drops anything the host sends that is not addressed to it.
Hardening
- Limits on new joins per network.
- Replayed or stale handshakes cost the host one key exchange at most.
- Forward mode (one guest, TCP bridge) no longer lets a second invite holder take over a live session, and it applies the personal-invite rules.
- The host's public address must be confirmed by two STUN servers.
- Rendezvous names, including the signal-server room, change every day.
- Line and size caps on the ntfy client, and caps on WebSocket connections.
- Root and administrator processes no longer write into the user's home folder or follow links there.
- Root and administrator processes run system tools by absolute path.
- The macOS helper is installed under
/Library/PrivilegedHelperTools/strait, after an ownership check. - On Windows, crash-recovery state lives in the admin-only
Program Files\Straitfolder. - Linux can now undo a crashed full tunnel with
recover.
Renamed
- The
--relayoption is now--signal. It only names the optional server that introduces two devices; Strait never relays traffic.
Honest labels
- The settings that used to say "Kill switch" and "Block IPv6" now describe what they actually do.
Design and limits: docs/HANDSHAKE.md.
Install
| System | File | How |
|---|---|---|
| Ubuntu / Debian, Intel/AMD | strait_0.5.0_amd64.deb |
sudo apt install ./strait_0.5.0_amd64.deb, then open Strait from the menu |
| Ubuntu / Debian, ARM | strait_0.5.0_arm64.deb |
same, with this file |
| macOS, Apple silicon and Intel | strait-0.5.0-macos-universal.dmg |
drag to Applications, right-click and choose Open the first time, then enter your password |
| Windows 10/11 64-bit | strait-0.5.0-windows-x64.zip |
unzip, keep Strait.exe and wintun.dll together, double-click and accept the administrator prompt |
| Other Linux | strait-0.5.0-linux-x64.tar.gz, strait-0.5.0-linux-arm64.tar.gz |
sudo ./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:
- A guest reaches the internet with the host's address (both the kernel and the userspace exit). It cannot open connections to:
- mail port 25 (port 587 works);
- the host's public address, tunnel address or LAN address;
- the host's cloud DNS;
- another guest. It can ping the host's tunnel address, but not another guest.
- Invites:
- 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.
- an invite without
- Forward mode: a second guest is refused as "full" while the first guest's connection is open, and gets in once it closes.
Connections:
- Host with a public address, guests behind three NAT types: 12 of 12 connections (UDP, Shadowsocks, WebSocket, AmneziaWG), 0.5 to 1.1 s, 0% loss.
- Hosts behind NAT with no address in the invite, found through Nostr, MQTT and ntfy: 18 of 20.
- The two failures are WebSocket from or to a symmetric NAT, which the previous release could not do either.
- A symmetric-NAT host takes 29 to 56 s (port scanning), within the earlier range.
- Key rotation: 290 s at 20 Mbit/s, with 1450 of 1450 pings answered and no TCP retransmits.
- Traffic-shape filter on the guest's router: same results as 0.4.x. Level 3 lets UDP, Shadowsocks and AmneziaWG through (55 to 100 Mbit/s); level 4 blocks all four tested transports.
Windows:
- Windows guest to a Linux host from the release zip: 254 Mbit/s.
- Linux guest through a Windows host: it leaves from the Windows address.
Packages:
- Ubuntu packages (x86-64 and arm64): install, report 0.5.0 and open the window on a virtual screen.
- macOS disk image: signature verifies; both architectures run.
- Unit and integration tests: all pass.
Not tested / known limits
- The macOS administrator prompt with the new helper folder, and the Windows window on a real desktop. These need a person at the screen.
- Linux crash recovery (
recover) and the IPv6 route change on Linux were not exercised on a real crash. - A host's signed record stays valid for its day, so it can be replayed within that day.
- A malicious host can point its guests' port scan at an address of its choosing for a few minutes.
- WebSocket hole punching does not work through a symmetric NAT.
- 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.