-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·43 lines (36 loc) · 1.16 KB
/
setup.sh
File metadata and controls
executable file
·43 lines (36 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
set -euo pipefail
echo "=== ProxyClaw Setup ==="
# Check API key
if [ -z "${IPLOOP_API_KEY:-}" ]; then
echo "❌ IPLOOP_API_KEY is not set."
echo ""
echo "Get your free API key:"
echo " 1. Sign up at https://iploop.io/signup.html"
echo " 2. Go to Dashboard → API Keys"
echo " 3. Copy your key"
echo ""
echo "Then: export IPLOOP_API_KEY=\"your_key\""
exit 1
fi
echo "✅ IPLOOP_API_KEY is set"
# Test connectivity — auth passed via --proxy-user to prevent exposure in ps aux
echo "Testing proxy connectivity..."
RESULT=$(curl -s -o /dev/null -w "%{http_code}" --max-time 15 \
--proxy "http://proxy.iploop.io:8880" \
--proxy-user "user:${IPLOOP_API_KEY}" \
https://httpbin.org/ip 2>/dev/null || echo "000")
if [ "$RESULT" = "200" ]; then
echo "✅ Proxy connection successful"
else
echo "⚠️ Proxy returned HTTP $RESULT (may need valid API key)"
fi
# Check for HTML→MD converter
if command -v nhm &>/dev/null; then
echo "✅ node-html-markdown (nhm) available"
else
echo "ℹ️ node-html-markdown not installed (optional)"
echo " Install: npm install -g node-html-markdown"
fi
echo ""
echo "✅ ProxyClaw is ready"