Files
devvm/internal/platform
w3cjandClaude Opus 5.5 cd7f202b64 fix(ports): choose new ports below the host's ephemeral range
The proxy's, desktop's and Lima's ssh ports came from 20000-59999 (or the
kernel's port 0, inside the ephemeral range), which overlaps Linux's
ephemeral range: a live outgoing connection could take the port between
the check and the bind. One owner now picks them: platform.FreePort over
platform.ChoosablePorts, 20000 up to just below the ephemeral range
(Linux: ip_local_port_range; macOS: net.inet.ip.portrange.first, 49152 if
unreadable), or 20000-32767 when unknown or too small. Proxy.Ports is
the seam.

Tests: TestPortsBelow, TestParsePortRangeFirst, platform's TestFreePort;
netpolicy's TestFreePort checks the chosen range.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 15:08:18 -07:00
..
2026-10-24 03:11:14 -06:00
2026-10-24 03:11:14 -06:00