A clean, simple, and powerful web-based proxy platform designed in Python (Flask). Browse any website through the proxy with seamless navigation and support for both traditional and Single Page Applications (SPAs/PWAs).
A modern Python-based web proxy service for secure, flexible, and privacy-focused browsing. This project uses Flask and Requests to proxy web traffic, rewrite URLs, and provide SSRF protection, CORS support, and easy deployment via Docker and Nginx.
- Unified Proxy Domain: All proxied traffic routes through a single domain (default:
proxy.maxbase.ir). - Flexible URL Rewriting: Automatically rewrites absolute and protocol-relative URLs for seamless proxying.
- SSRF Protection: Blocks requests to private and unsafe IP ranges.
- CORS Support: Configurable CORS headers for cross-origin requests.
- Customizable Timeout & SSL: Set request timeouts and toggle SSL verification for upstream requests.
- Docker & Nginx Ready: Includes Dockerfile and Nginx configs for scalable deployment.
-
Install dependencies:
pip install -r requirements.txt
-
Run the app:
python app.py
-
Access the setup page: Open http://localhost:5000/maxme in your browser.
-
Configure target site:
- Enter the target URL you want to proxy.
- Optionally specify domains for URL rewriting.
-
Browse via proxy: After setup, all requests to
/or/<path>will be proxied through your chosen target.
Edit config.py to customize:
PROXY_DOMAIN: Main proxy domainPROXY_ROUTE_PREFIX: Prefix for proxied routesREQUEST_TIMEOUT: Upstream request timeoutSSL_VERIFY: SSL certificate verification (can be set viaSSL_VERIFYenv var)- CORS settings: Allowed origins, methods, headers
PROCESSABLE_CONTENT_TYPES: Content types for URL rewriting
- Build the image:
docker build -t onlinevpn . - Run with Docker Compose:
docker-compose up
- See
nginx/nginx.confandnginx/conf.d/for sample configs. - Use Nginx as a reverse proxy for HTTPS and load balancing.
- SSRF protection blocks requests to private IP ranges.
- SSL verification is configurable (default: disabled for flexibility).
- CORS headers are set for cross-origin support.
- Endpoint:
/healthreturns{"status": "ok"}for monitoring.
app.py: Main Flask proxy appconfig.py: Configuration settingstemplates/index.html: Setup pagenginx/: Nginx configsdocker-compose.yml,Dockerfile: Containerizationtest_*.py: Test scripts
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.
Copyright 2025, Seyyed Ali Mohammadiyeh (Max Base)
