2.5 KiB
2.5 KiB
Testing FireProxy
This document provides instructions for testing the FireProxy server.
Building the Proxy
First, build the proxy server:
make clean
make
Running the Proxy
Start the proxy server on port 8080 (or another port of your choice):
./fireproxy 8080
Testing with a Web Browser
Firefox Configuration
- Open Firefox and go to Settings
- Search for "proxy" and click on "Settings" in the Network Settings section
- Select "Manual proxy configuration"
- Set HTTP Proxy to "localhost" and Port to "8080"
- Leave other proxy fields empty
- Check "Also use this proxy for HTTPS"
- Click "OK"
Chrome Configuration
- Open Chrome and go to Settings
- Search for "proxy" and click on "Open your computer's proxy settings"
- Enable proxy settings according to your operating system:
- Windows: Set the HTTP proxy to "localhost:8080"
- macOS: Set the Web Proxy (HTTP) to "localhost" with port "8080"
- Linux: Set the HTTP proxy to "localhost" with port "8080"
Testing with cURL
You can use cURL to test your proxy:
# Test HTTP request through proxy
curl -v --proxy http://localhost:8080 http://example.com/
# Test HTTPS request through proxy (if supported)
curl -v --proxy http://localhost:8080 https://example.com/
Verifying DoH Functionality
To verify that your proxy is using the DoH server for DNS resolution:
- Run the proxy with increased verbosity (if available)
- In another terminal, monitor the proxy output while making requests
- You should see messages indicating DoH lookups to hnsdoh.com
- The proxy should log the resolved IP addresses
Troubleshooting
Common Issues
- Connection refused: Make sure the proxy is running and listening on the configured port
- DNS resolution failures: Check your internet connection and access to hnsdoh.com
- Memory leaks: For long-running tests, monitor memory usage to ensure proper cleanup
Using Network Monitoring Tools
You can use tools like Wireshark to monitor the traffic:
# Capture traffic on loopback interface
sudo tcpdump -i lo port 8080 -vv
Performance Testing
For load testing the proxy:
# Install Apache Bench (ab) if not already installed
# Then test with multiple concurrent connections
ab -n 1000 -c 10 -X localhost:8080 http://example.com/
Security Testing
Since your proxy handles web traffic, consider testing for:
- Buffer overflow vulnerabilities using oversized requests
- Handling of malformed HTTP requests
- Proper handling of connection termination