Repository navigation
Strait 0.8.0
What is new
A fourth security round: three independent reviews of 0.7.0 and an outside review. Hosts and guests both need 0.8.0: the join handshake and the WebSocket certificate changed.
None of these changes interrupts a connection that is up. Join renewal runs only before a guest has joined, key rotation is seamless, and a new daily certificate affects only new connections.
Joins
- The handshake binds its first message to the client nonce, so a join cannot be moved under another nonce.
- The replay memory keeps every fresh join for its whole lifetime. If it ever fills, it refuses older joins instead of forgetting them. A guest's own retry is still answered.
- A guest renews its join every 30 s while it waits, so a join it sent before the host started never goes stale.
- Join limits: 20 per 10 s per address (IPv6 per /48), 80 per wider network (IPv4 /24, IPv6 /32), and 5000 per 10 s in total. A refused join no longer counts against its sender, so guests behind one address cannot lock each other out.
- A host checks admission again every few seconds. A session ends when its personal invite is withdrawn or expires, or when the host switches to personal invites only.
Forward mode and roaming
- A new join replaces a live forward-mode session only once its first packet arrives, and only the current guest's address gets a retried answer.
- A roaming guest's new address is confirmed before the session moves to it.
Host as a scanner
- The punch budget (64 new addresses an hour, never a port below 1024) now also covers addresses that come from a signal server, and a host ignores signal-server redirects once a guest has joined.
What a guest can reach
- The host's own LAN subnets (/16 or narrower, on any interface) are refused to guests unless the host allows the LAN.
Full tunnel
- Linux: DNS goes through the tunnel (resolvectl on the tunnel link), and IPv6 is blocked during the session.
- Linux: the system's default route is no longer replaced. Two /1 routes through the tunnel take over and leave with it, so the original route (with its DHCP source and metric) is exactly as before. Before, a plain copy of it was put back next to the original.
- Linux: the restore state lives in a root-only folder.
- macOS and Windows: the restore state is saved before DNS and IPv6 are changed, so a crash in between can always be undone. macOS recovery also restores the default route.
--tun-bypasstakes only IPv4 addresses and networks.
Android
- The app's own connections leave outside the VPN, and every public address goes through the tunnel (before, the /8 of the host's address was left out).
WebSocket transport
- The TLS certificate uses a new subkey every day, so it cannot link a host across days. A guest accepts yesterday's, today's and tomorrow's.
- Pending TLS handshakes are capped per /24 (IPv4) and /64 (IPv6).
Other
- Xray no longer picks a local address as its default REALITY target.
- The privileged helper creates its folder and log files with fixed owners and modes.
- The ProVerif model adds an oracle for the host's guest-record decryption, and every property still holds.
Install
| System | File | How |
|---|---|---|
| Ubuntu / Debian, Intel/AMD | strait_0.8.0_amd64.deb |
sudo apt install ./strait_0.8.0_amd64.deb, then open Strait from the menu |
| Ubuntu / Debian, ARM | strait_0.8.0_arm64.deb |
same, with this file |
| macOS, Apple silicon and Intel | strait-0.8.0-macos-universal.dmg |
drag to Applications, right-click and choose Open the first time |
| Windows 10/11 64-bit | strait-0.8.0-windows-x64.zip |
unzip, keep Strait.exe and wintun.dll together, double-click and accept the administrator prompt |
| Other Linux | strait-0.8.0-linux-x64.tar.gz, strait-0.8.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 (11 of 11 checks):
- an invite without
hkand one with a damagedhkstop at once; - 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, and the refused guest stops instead of retrying;
- another person's invite still works;
- a copy of a personal invite is refused while its owner is connected, and the owner's session stays up. A second run held the owner's session for 5 minutes: the host refused the copy as in use, and only the owner joined.
- 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.
- What a host can reach on a guest: nothing. Ping, SSH, a TCP listener and a UDP listener on the guest all stay unreachable, while the same listeners receive local traffic (control).
- Forward mode: a second guest is refused while the first guest's only connection sits idle for 75 s, and that connection still works afterwards.
- A guest that starts before its host joins once the host is up, with no stale-join refusal.
- Linux full tunnel: traffic leaves from the host's address, DNS goes to 1.1.1.1 on the tunnel link for every name, the system's default route stays as it was during and after the session, and no IPv6 reject routes are left.
Sessions are not interrupted:
- Key rotation: 290 s at 20 Mbit/s, 0% loss, no TCP retransmits.
- A game-like session: 64 small UDP packets a second for 18 minutes, across 9 key rotations, while another guest joined and left: 0 of 69,120 packets lost, the longest pause 46 ms (packets are 16 ms apart), round trip 92 to 94 ms between Frankfurt and Virginia.
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 10 to 49 s.
- Traffic-shape filter on the guest's router: same results as 0.7.0. Level 3 lets UDP, Shadowsocks and obfuscated UDP through (57 to 118 Mbit/s); level 4 blocks all four tested transports.
Windows:
- Windows guest from the release zip: 264 Mbit/s. In a full tunnel its traffic leaves from the host's address, and 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.8.0 and open the window on a virtual screen.
- macOS disk image: verifies, both architectures run, and the app opens as the user with no administrator prompt.
- About 600 unit and integration tests pass on macOS. On Linux runners with two CPUs, three load-sensitive loopback tests (256 guests behind one address, one NAT-matrix case, one port-scan case) fail now and then; 0.7.0 fails them the same way, and they are being fixed separately.
- ProVerif proves every property in the model.
Not tested / known limits
- The macOS password prompt for the privileged tunnel, the Linux
pkexecprompt, and the Windows window on a real desktop. These need a person at the screen. - The Android changes were reviewed but not compiled or run on a phone.
- No kill switch: if Strait stops, traffic uses the normal connection again.
- WebSocket hole punching does not work through a symmetric NAT.
- The personal token is not forward secret, and neither is a guest's sealed rendezvous record: someone who records them and later steals the host key learns which token was used and where the guest connected from (not the traffic).
- The punch budget is per host, not per person: one invite holder can use it up for an hour.
- Holders of the shared invite on two networks can fill a host; a host that takes personal invites only gives each person one slot.
- The tunnel program is not code-signed: root checks that its copy matches what the window staged, not that it is genuine.
- No outside party has audited the design.