@justprove/mobilevc
Advanced tools
+23
-2
@@ -1254,2 +1254,3 @@ #!/usr/bin/env node | ||
| const wired = []; | ||
| const privateLan = []; | ||
| const other = []; | ||
@@ -1259,2 +1260,5 @@ | ||
| if (!entries) continue; | ||
| if (isVirtualNetworkInterfaceName(name)) { | ||
| continue; | ||
| } | ||
| for (const entry of entries) { | ||
@@ -1264,3 +1268,3 @@ if (!entry || entry.family !== 'IPv4' || entry.internal) { | ||
| } | ||
| if (isLinkLocalIpv4(entry.address)) { | ||
| if (isLinkLocalIpv4(entry.address) || isVpnLikeIpv4(entry.address)) { | ||
| continue; | ||
@@ -1274,2 +1278,4 @@ } | ||
| wired.push(entry.address); | ||
| } else if (isPrivateLanIpv4(entry.address)) { | ||
| privateLan.push(entry.address); | ||
| } else { | ||
@@ -1281,3 +1287,3 @@ other.push(entry.address); | ||
| return wifi[0] || wired[0] || other[0] || null; | ||
| return wifi[0] || wired[0] || privateLan[0] || other[0] || null; | ||
| } | ||
@@ -1289,2 +1295,17 @@ | ||
| function isVirtualNetworkInterfaceName(name) { | ||
| const lowered = String(name || '').toLowerCase(); | ||
| return /(tailscale|utun|tun|tap|wg|wireguard|zerotier|clash|mihomo|sing-box|v2ray|vpn|ppp|docker|br-|veth|vmware|virtualbox|hyper-v|wintun|loopback)/.test(lowered); | ||
| } | ||
| function isPrivateLanIpv4(address) { | ||
| return /^192\.168\./.test(address) || | ||
| /^172\.(1[6-9]|2\d|3[0-1])\./.test(address) || | ||
| /^10\./.test(address); | ||
| } | ||
| function isVpnLikeIpv4(address) { | ||
| return /^100\.(6[4-9]|[7-9]\d|1[01]\d|12[0-7])\./.test(address); | ||
| } | ||
| function promptInput(question, silent = false) { | ||
@@ -1291,0 +1312,0 @@ return new Promise((resolve) => { |
+6
-6
| { | ||
| "name": "@justprove/mobilevc", | ||
| "version": "0.2.11", | ||
| "version": "0.2.12", | ||
| "description": "Claude Code mobile workspace launcher with precompiled MobileVC backend binaries.", | ||
@@ -33,8 +33,8 @@ "license": "MIT", | ||
| "optionalDependencies": { | ||
| "@justprove/mobilevc-server-darwin-arm64": "0.2.11", | ||
| "@justprove/mobilevc-server-darwin-x64": "0.2.11", | ||
| "@justprove/mobilevc-server-linux-arm64": "0.2.11", | ||
| "@justprove/mobilevc-server-linux-x64": "0.2.11", | ||
| "@justprove/mobilevc-server-win32-x64": "0.2.11" | ||
| "@justprove/mobilevc-server-darwin-arm64": "0.2.12", | ||
| "@justprove/mobilevc-server-darwin-x64": "0.2.12", | ||
| "@justprove/mobilevc-server-linux-arm64": "0.2.12", | ||
| "@justprove/mobilevc-server-linux-x64": "0.2.12", | ||
| "@justprove/mobilevc-server-win32-x64": "0.2.12" | ||
| } | ||
| } |
58527
1.33%1292
1.41%