Bug: Hyper-V Meta adapter IP (198.18.x.x) treated as public IP
Location: packages/cli/src/network.ts lines 6-14, isPrivateIP()
Problem: WSL2 uses a Hyper-V virtual adapter in the 198.18.0.0/15 range (RFC 8768). The current isPrivateIP() only checks RFC 1918 ranges (10.x, 172.16-31.x, 192.168.x.x), so 198.18.x.x is incorrectly classified as public. This causes the CLI to attempt external connections instead of local loopback, breaking phone connectivity.
Suggested fix: Add 198.18.0.0/15 to the private IP check:
if ((ip >= '10.0.0.0' && ip <= '10.255.255.255') ||
(ip >= '172.16.0.0' && ip <= '172.31.255.255') ||
(ip >= '192.168.0.0' && ip <= '192.168.255.255') ||
(ip >= '198.18.0.0' && ip <= '198.19.255.255')) {
return true;
}
Environment: Windows 11 + WSL2 (Hyper-V), Node.js 20.x
Bug: Hyper-V Meta adapter IP (198.18.x.x) treated as public IP
Location:
packages/cli/src/network.tslines 6-14,isPrivateIP()Problem: WSL2 uses a Hyper-V virtual adapter in the 198.18.0.0/15 range (RFC 8768). The current
isPrivateIP()only checks RFC 1918 ranges (10.x, 172.16-31.x, 192.168.x.x), so 198.18.x.x is incorrectly classified as public. This causes the CLI to attempt external connections instead of local loopback, breaking phone connectivity.Suggested fix: Add
198.18.0.0/15to the private IP check:Environment: Windows 11 + WSL2 (Hyper-V), Node.js 20.x