Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0b5f974e2 |
No files matched your search
@@ -96,12 +96,8 @@ if ($Mode -eq 'local') {
|
||||
Write-Host " URL: ${Cyan}http://localhost:${WebUiPort}${NC}"
|
||||
} else {
|
||||
Warn 'Modo: VPS (accesible desde fuera)'
|
||||
# IP real de LAN: la de la interfaz con la ruta por defecto (evita vEthernet
|
||||
# WSL/Hyper-V, Docker, VPN — que son 172.16-31.*, 10.x internos, etc.)
|
||||
$GwIf = (Get-NetRoute -DestinationPrefix '0.0.0.0/0' -ErrorAction SilentlyContinue |
|
||||
Sort-Object RouteMetric | Select-Object -First 1).ifIndex
|
||||
$Ip = (Get-NetIPAddress -AddressFamily IPv4 -ErrorAction SilentlyContinue |
|
||||
Where-Object { $_.ifIndex -eq $GwIf -and $_.IPAddress -notlike '127.*' } |
|
||||
Where-Object { $_.IPAddress -notlike '127.*' -and $_.IPAddress -notlike '169.254.*' -and $_.IPAddress -notmatch '^172\.(1[6-9]|2[0-9]|3[01])\.' } |
|
||||
Select-Object -First 1).IPAddress
|
||||
if (-not $Ip) { $Ip = 'TU_IP' }
|
||||
Write-Host " URL: ${Cyan}http://${Ip}:${WebUiPort}${NC}"
|
||||
|
||||
@@ -131,12 +131,8 @@ if ($Mode -eq 'local') {
|
||||
Write-Host " IA (chat): ${Cyan}http://localhost:${WebUiPort}${NC}"
|
||||
} else {
|
||||
Warn 'Modo: VPS (accesible desde fuera)'
|
||||
# IP real de LAN: la de la interfaz con la ruta por defecto (evita
|
||||
# vEthernet WSL/Hyper-V, Docker, VPN)
|
||||
$GwIf = (Get-NetRoute -DestinationPrefix '0.0.0.0/0' -ErrorAction SilentlyContinue |
|
||||
Sort-Object RouteMetric | Select-Object -First 1).ifIndex
|
||||
$Ip = (Get-NetIPAddress -AddressFamily IPv4 -ErrorAction SilentlyContinue |
|
||||
Where-Object { $_.ifIndex -eq $GwIf -and $_.IPAddress -notlike '127.*' } |
|
||||
Where-Object { $_.IPAddress -notlike '127.*' -and $_.IPAddress -notlike '169.254.*' -and $_.IPAddress -notmatch '^172\.(1[6-9]|2[0-9]|3[01])\.' } |
|
||||
Select-Object -First 1).IPAddress
|
||||
if (-not $Ip) { $Ip = 'TU_IP' }
|
||||
Write-Host " WordPress: ${Cyan}http://${Ip}:${WpPort}${NC}"
|
||||
|
||||
Reference in new issue
Block a user