Files
alfred-proxy/test-connection.sh

35 lines
1.0 KiB
Bash
Raw Permalink Normal View History

#!/bin/bash
# Test Alfred Proxy connection
PROXY_URL="${PROXY_URL:-ws://localhost:18790}"
OAUTH_TOKEN="${OAUTH_TOKEN:-test-token}"
echo "🧪 Testing Alfred Proxy"
echo "URL: $PROXY_URL"
echo ""
# Check health endpoint
echo "1. Testing health endpoint..."
curl -s http://localhost:18790/health | jq . || echo "❌ Health check failed"
echo ""
# Test WebSocket connection (requires wscat)
if command -v wscat &> /dev/null; then
echo "2. Testing WebSocket connection..."
echo " (This will fail without a valid OAuth token)"
echo ""
echo " Install wscat: npm install -g wscat"
echo " Then run: wscat -c \"$PROXY_URL\" -H \"Authorization: Bearer YOUR_TOKEN\""
else
echo "2. Skipping WebSocket test (wscat not installed)"
echo " Install: npm install -g wscat"
fi
echo ""
echo "✅ Basic tests complete"
echo ""
echo "Next steps:"
echo "1. Get OAuth token from Authentik"
echo "2. Test connection: wscat -c \"$PROXY_URL\" -H \"Authorization: Bearer TOKEN\""
echo "3. Check logs: journalctl --user -u alfred-proxy.service -f"