31 lines
1.1 KiB
PowerShell
31 lines
1.1 KiB
PowerShell
|
|
# Open Windows Firewall for Alfred Proxy
|
||
|
|
# Run as Administrator
|
||
|
|
|
||
|
|
Write-Host "Opening firewall for Alfred Proxy (port 18790)..." -ForegroundColor Cyan
|
||
|
|
|
||
|
|
# Remove old rule if it exists
|
||
|
|
Get-NetFirewallRule -DisplayName "Alfred Proxy" -ErrorAction SilentlyContinue | Remove-NetFirewallRule
|
||
|
|
|
||
|
|
# Create new rule
|
||
|
|
New-NetFirewallRule `
|
||
|
|
-DisplayName "Alfred Proxy" `
|
||
|
|
-Direction Inbound `
|
||
|
|
-LocalPort 18790 `
|
||
|
|
-Protocol TCP `
|
||
|
|
-Action Allow `
|
||
|
|
-Profile Any `
|
||
|
|
-Enabled True
|
||
|
|
|
||
|
|
Write-Host "✅ Firewall rule created successfully!" -ForegroundColor Green
|
||
|
|
Write-Host " Port 18790 is now open for incoming connections" -ForegroundColor Gray
|
||
|
|
|
||
|
|
# Test if port is listening
|
||
|
|
Write-Host "`nTesting if proxy is listening..." -ForegroundColor Cyan
|
||
|
|
$listening = Get-NetTCPConnection -LocalPort 18790 -ErrorAction SilentlyContinue
|
||
|
|
if ($listening) {
|
||
|
|
Write-Host "✅ Proxy is listening on port 18790" -ForegroundColor Green
|
||
|
|
} else {
|
||
|
|
Write-Host "⚠️ No service is listening on port 18790 yet" -ForegroundColor Yellow
|
||
|
|
Write-Host " Start the proxy with: cd ~/.openclaw/workspace/alfred-proxy && npm start" -ForegroundColor Gray
|
||
|
|
}
|