增加局域网访问

This commit is contained in:
dekun
2026-05-19 01:00:26 +08:00
parent 0203a65973
commit 4ad0ebe581
7 changed files with 53 additions and 19 deletions
+3 -1
View File
@@ -10,4 +10,6 @@ if (-not (Get-Command pm2 -ErrorAction SilentlyContinue)) {
pm2 restart api-key-manager
Write-Host "已重启 api-key-manager" -ForegroundColor Green
Write-Host "访问: http://127.0.0.1:5200" -ForegroundColor Cyan
$lan = (Get-NetIPAddress -AddressFamily IPv4 -ErrorAction SilentlyContinue | Where-Object { $_.IPAddress -notmatch '^127\.' } | Select-Object -First 1).IPAddress
Write-Host "本机: http://127.0.0.1:5200" -ForegroundColor Cyan
if ($lan) { Write-Host "局域网: http://${lan}:5200" -ForegroundColor Cyan }