-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_proxy.sh
More file actions
executable file
·29 lines (21 loc) · 918 Bytes
/
test_proxy.sh
File metadata and controls
executable file
·29 lines (21 loc) · 918 Bytes
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
#!/usr/bin/env bash
# Configure proxy settings
export http_proxy="http://localhost:8080"
export https_proxy="http://localhost:8080"
echo "Starting proxy test requests..."
# Test 1: Simple HTTP request
echo "Testing HTTP request..."
curl -s -o /dev/null http://example.com
# Test 2: HTTPS request (with -k to ignore TLS warnings)
echo "Testing HTTPS request..."
curl -s -k -o /dev/null https://google.com
# Test 3: JSON API request (with -k to ignore TLS warnings)
echo "Testing JSON API request..."
curl -s -k -o /dev/null https://api.github.com/users/octocat
# Test 4: Site with redirects
echo "Testing redirects..."
curl -s -k -L -o /dev/null http://github.com
# Test 5: Different content type (image) (with -k to ignore TLS warnings)
echo "Testing image content..."
curl -s -k -o /dev/null https://raw.githubusercontent.com/github/explore/main/topics/python/python.png
echo "Proxy test requests completed!"