Repository navigation
Strait 0.7.0
What is new
A third security round, from an outside review of 0.6.0 and an independent second review of the whole codebase. Hosts and guests both need 0.7.0: records, the WebSocket certificate and the DHT keys changed.
One key, one use
- The host key itself signs nothing any more. Rendezvous records, the WebSocket transport's TLS handshake and the host's DHT items are signed with subkeys made for each invite (key blinding, as Tor onion services do). A guest derives them from
hkand the invite. - Knowing
hkalone no longer links a host's records or certificates: not for someone removed with Change every invite, and not for a prober that saw the WebSocket certificate. - The outer tag has its own key instead of reusing the handshake's pre-shared key.
Joins
- The replay memory is keyed on the handshake's one-time key, so re-wrapping a recorded join under a fresh nonce no longer makes it new.
- A host refuses joins made before it started (60 s of slack), so a recording from before a restart is stale too.
- Many senders can no longer lock everyone out: the join limiter forgets old networks instead of refusing all. IPv6 counts per /48. Each personal invite also has its own budget.
- A guest the host refused stops trying, instead of retrying every second.
- Forward mode: another address (IP and port) cannot take a live session over, and a retried answer goes only to the guest's own address.
Privacy
- A guest's rendezvous record (its public address) is sealed to the host's key. Other invite holders can no longer read where other guests connect from.
- Only the host can publish its DHT record, so invite holders cannot overwrite it.
- The full tunnel's log files are readable by the user only (they were readable by everyone on the computer).
The guest's inbound rule
- Only replies get in: TCP that answers the guest, UDP from an address and port the guest sent to, and ICMP echo replies and errors. Every other protocol and every fragment is dropped, so the host can no longer even ping the guest.
Host as a scanner
- The host punches at most 64 new guest addresses an hour, never a port below 1024, over UDP and over TCP for the WebSocket transport.
Removal
- After you remove someone, "Personal invites only" stays on until you change every invite, even after their personal invite expires: it holds the shared invite key.
Other
- Linux full tunnel: IPv6 reject routes for both halves of the address space, as on macOS.
- The host key is passed only to the WebSocket transport, and is never printed in logs or debug output.
- The ProVerif model now also covers host-to-guest traffic, forward secrecy after the host key leaks, and a host-side session property. It also lists its abstractions, and confirms the known limit that the personal token is not forward secret.
Install
| System | File | How |
|---|---|---|
| Ubuntu / Debian, Intel/AMD | strait_0.7.0_amd64.deb |
sudo apt install ./strait_0.7.0_amd64.deb, then open Strait from the menu |
| Ubuntu / Debian, ARM | strait_0.7.0_arm64.deb |
same, with this file |
| macOS, Apple silicon and Intel | strait-0.7.0-macos-universal.dmg |
drag to Applications, right-click and choose Open the first time |
| Windows 10/11 64-bit | strait-0.7.0-windows-x64.zip |
unzip, keep Strait.exe and wintun.dll together, double-click and accept the administrator prompt |
| Other Linux | strait-0.7.0-linux-x64.tar.gz, strait-0.7.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.
- 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.
- Key rotation: 290 s at 20 Mbit/s, 0% loss.
Connections:
- Host with a public address, guests behind three NAT types: 12 of 12 connections (UDP, Shadowsocks, WebSocket with the new TLS subkey, 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, with guest records now sealed to the host: 17 of 20. The three failures are WebSocket with a symmetric NAT on one side, the known limit below. A symmetric-NAT host takes 30 to 57 s.
- Traffic-shape filter on the guest's router: same results as 0.6.0. Level 3 lets UDP, Shadowsocks and obfuscated UDP through (44 to 82 Mbit/s); level 4 blocks all four tested transports.
Windows:
- Windows guest from the release zip: 282 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.7.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.
- 596 unit and integration tests pass. ProVerif proves every property in the model, and the blinded record signature was checked against an independent Python implementation of RFC 8032.
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 compiled but not 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: someone who records a join and later steals the host key learns which token was used (not the traffic).
- 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.