Skip to content

MichealKrugman/A-simple-Python-Proxy-Server-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Rotating Proxy Server

How-proxy-servers-work

A high-performance proxy server that automatically rotates through different proxy IPs for each request. Designed for security testing with tools like SQLMap to bypass WAF detection and IP blocking.

What it does

Forces a new proxy for every request to avoid detection. Handles both HTTP and HTTPS traffic through CONNECT tunneling. Works with authenticated proxies and has smart fallback to direct connections when all proxies fail. Includes detailed logging to track which proxies are working.

Setup

Install requirements:

pip install requests urllib3

Create a proxies.txt file with one proxy per line:

proxy1.example.com:8080 username:[email protected]:3128

Run the server:

python3 rotating_proxy.py

Configure your tools to use 127.0.0.1:8888 as the proxy.

Usage with SQLMap

sqlmap -u "http://target.com/page.php?id=1" --proxy="http://127.0.0.1:8888"

The server will automatically rotate to a different proxy IP for each SQLMap request, making detection much harder.

Configuration

Edit these variables at the top of the script:

python LISTEN_HOST = "127.0.0.1" LISTEN_PORT = 8888 PROXIES_FILE = "proxies.txt" FORCE_ROTATION = True REQUEST_TIMEOUT = 60 PROXY_TIMEOUT = 30 ENABLE_DIRECT_FALLBACK = True

Proxy formats supported

Basic: proxy.example.com:8080 With auth: user:[email protected]:8080 Comments allowed in file with # symbol

Legal notice

This tool is for authorized security testing only. Get proper written permission before testing any systems you don't own. Unauthorized access is illegal. Use responsibly for penetration testing, bug bounties, and security research within proper scope.

How it works

The server sits between your security tools and the target. Each request gets sent through a different proxy from your list. Failed proxies get marked and skipped. Supports proxy authentication and HTTPS tunneling. Falls back to direct connection if all proxies fail.

Troubleshooting

If proxies aren't working, check the format in your proxies.txt file. Test individual proxies with curl first. Increase timeout values if getting connection errors. Make sure your proxy credentials are correct.

Requirements

Python 3.6 or newer requests library
urllib3 library List of working proxies

Made by Giwa with love for the security community

About

A simple Python Proxy Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages