Releases: rmunate/HTTP-Proxy-Server
Release list
v3.0.0
HTTP Proxy Server
π Overview
HTTP Proxy Server is an advanced solution to manage, audit, and control HTTP/HTTPS traffic, ideal for companies and developers. You can run it as a Windows service or as a Python script.
Main features:
- π Persistent and isolated sessions for each client
- β‘ Full RESTful API: login, proxy, session management, headers and cookies
- π οΈ Flexible configuration via
.envfile or environment variables - π Detailed activity logs
- π§© Interactive documentation (Swagger UI)
π How to run the server?
π₯οΈ As an executable (Windows)
- Place
HttpProxyServer.exein the desired folder and run:The process runs in the background, with no visible console.HttpProxyServer.exe
π As a Python script (development)
- Clone the repository and enter the folder:
git clone <repo_url> cd http-proxy-server
- Create a virtual environment and install dependencies:
python -m venv venv venv\Scripts\activate pip install -r requirements.txt
- Run the server:
python main.py
βοΈ Configuration
Configuration is flexible and follows this priority:
.envfile (in the same folder as the executable/script)- Environment variables
- Default values
Example .env:
SERVER_HOST=0.0.0.0
SERVER_PORT=8000
LOG_LEVEL=info
ACCESS_LOG=false
RELOAD=false
WORKERS=1
SESSION_TIMEOUT=600
CLEANUP_INTERVAL=300Equivalent environment variables:
set SERVER_HOST=0.0.0.0
set SERVER_PORT=9000
set LOG_LEVEL=debug
set SESSION_TIMEOUT=1200
set CLEANUP_INTERVAL=600
set ACCESS_LOG=trueπ Main endpoints and use cases
Note: After creating a session, you must send the
X-Session-IDheader in all requests.
Health Check
GET /health-check β Checks server and connectivity status.
Create session
POST /subscribe β Creates a unique session for the client.
Response:
{
"status": "OK",
"session": { "session_id": "..." }
}Delete session
POST /unsubscribe β Deletes the session and clears cookies/headers.
Set custom headers
POST /set-headers β Defines HTTP headers for the session.
{
"Authorization": "Bearer token123",
"X-Custom-Header": "CustomValue"
}Get current headers
POST /get-headers β Returns the configured headers.
Get current cookies
POST /get-cookies β Returns the session's active cookies.
Full session info
POST /get-session-info
HTTP/HTTPS proxy requests
POST /forward β Forwards any HTTP/HTTPS request using the active session.
{
"url": "https://api.company.com/data",
"method": "GET",
"headers": { "Accept": "application/json", "X-Session-ID": "abc123" }
}File download
POST /dowwnload β Downloads binary files while maintaining session and authentication.
{
"url": "https://files.company.com/download/file.zip",
"method": "GET"
}π Logs
- All events are logged in
HttpProxyServer.log. - Levels: debug, info, warning, error.
- Example:
2026-01-15 20:49:00,123 [INFO] __main__ - Application initialized successfully 2026-01-15 20:49:01,456 [INFO] __main__ - Starting service health check
π How to stop the server?
- Task Manager:
Ctrl+Shift+Escβ findHttpProxyServer.exeβ end process - Command line:
taskkill /f /im HttpProxyServer.exe - PowerShell:
Get-Process -Name "HttpProxyServer" | Stop-Process -Force
π Typical workflow example
- Create session:
POST /subscribe - Login to external system using
/forward:curl -X POST "http://localhost:8000/forward" \ -H "Content-Type: application/json" \ -d '{ "url": "https://system.company.com/login", "method": "POST", "data": { "username": "my_user", "password": "my_password" }, "headers": { "Content-Type": "application/x-www-form-urlencoded" } }'
- Make authenticated requests:
POST /forward - Download files:
POST /dowwnload - Set custom headers:
POST /set-headers - Logout:
POST /unsubscribe
π οΈ Troubleshooting
- Port in use: Change the port in
.envor stop the existing process. - Permissions: Run as administrator or use ports >1024.
- No internet: Check network, corporate proxy, or firewall.
π Security
- HTTPS support, robust validation, audit logging, security headers, configurable timeouts, and more.
π Interactive documentation
Developer: Raul Mauricio UΓ±ate Castro
Version: 3.0.0
Date: January 20, 2026
v2.4.0
π HTTP Proxy Server - Release Notes
Version 2.0.0 - Windows Executable
Release Date: January 15, 2026
π What is HTTP Proxy Server?
A standalone Windows executable that provides an HTTP proxy server with persistent session management, designed to act as a bridge between applications and external systems requiring authentication.
π― Key Features
- π’ Enterprise Ready: Designed for corporate environments with proxy support
- π Session Management: Automatic cookie and authentication handling
- π¦ Zero Dependencies: Single 11.4MB executable, no Python installation required
- π REST API: Complete FastAPI-based endpoints with Swagger documentation
- π Health Monitoring: Built-in connectivity and service health checks
- π Audit Logging: Comprehensive request/response logging for compliance
π‘οΈ Security & Reliability
- β SSL/TLS Support: Full HTTPS compatibility
- β Input Validation: Robust Pydantic V2 validation
- β Background Service: Runs silently without console window
- β Timeout Protection: Configurable timeouts prevent hanging requests
- β Error Handling: Graceful error management with detailed logging
π API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/health |
GET | Service and connectivity health check |
/login |
POST | Authentication and session initialization |
/logout |
POST | Session termination and cleanup |
/forward |
POST | HTTP request proxy with session persistence |
/dowwnload |
POST | File download proxy (direct binary stream) |
/set-headers |
POST | Set custom headers for all session requests |
/get-headers |
POST | Get all current session headers |
/get-cookies |
POST | Get all current session cookies |
/get-session-info |
POST | Get detailed session information |
/docs |
GET | Interactive Swagger API documentation |
π§ Configuration Options
- Environment Variables:
SERVER_HOST,SERVER_PORT,LOG_LEVEL - Configuration File: Optional
.envfile support - Flexible Deployment: Can run on any port, any interface
- Production Ready: Optimized for Windows Server environments
π Quick Start
- Download
HttpProxyServer.exe - Run the executable (no installation required)
- Access documentation at
http://localhost:5003/docs - Use REST API for authentication and proxying
πΌ Use Cases
- Web Scraping: Maintain authenticated sessions across requests
- API Integration: Bridge between systems requiring different authentication
- Legacy System Access: Modern REST interface for older authentication systems
- Development & Testing: Local proxy for development environments
- Corporate Applications: Navigate through corporate proxy requirements
π What's New in v2.0.0
- Improved session management
- Enhanced error handling
- Better logging system
- Modern FastAPI framework
- Comprehensive input validation
- Windows service compatibility
- New endpoint
/dowwnload: Download files directly as binary streams, ideal for documents, images, and large files.
Example usage:
POST http://localhost:5003/dowwnload
Content-Type: application/json
{
"url": "https://files.company.com/download/file.zip",
"method": "GET"
}Returns the file as a direct download (streaming response).
π Support & Documentation
- Full Documentation: Available at
/docswhen server is running - Health Check: Monitor service status via
/healthendpoint - Logging: Automatic logs in
HttpProxyServer.log - Author: Raul Mauricio UΓ±ate Castro
π·οΈ Technical Specifications
- Framework: FastAPI 0.100+
- Platform: Windows 10/11, Windows Server 2016+
- Size: 11.4 MB (includes all dependencies)
- Memory: ~50MB runtime footprint
- Language: Python 3.12 (compiled to native executable)
v2.3.1
π HTTP Proxy Server - Release Notes
Version 2.0.0 - Windows Executable
Release Date: January 15, 2026
π What is HTTP Proxy Server?
A standalone Windows executable that provides an HTTP proxy server with persistent session management, designed to act as a bridge between applications and external systems requiring authentication.
π― Key Features
- π’ Enterprise Ready: Designed for corporate environments with proxy support
- π Session Management: Automatic cookie and authentication handling
- π¦ Zero Dependencies: Single 11.4MB executable, no Python installation required
- π REST API: Complete FastAPI-based endpoints with Swagger documentation
- π Health Monitoring: Built-in connectivity and service health checks
- π Audit Logging: Comprehensive request/response logging for compliance
π‘οΈ Security & Reliability
- β SSL/TLS Support: Full HTTPS compatibility
- β Input Validation: Robust Pydantic V2 validation
- β Background Service: Runs silently without console window
- β Timeout Protection: Configurable timeouts prevent hanging requests
- β Error Handling: Graceful error management with detailed logging
π API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/health |
GET | Service and connectivity health check |
/login |
POST | Authentication and session initialization |
/logout |
POST | Session termination and cleanup |
/forward |
POST | HTTP request proxy with session persistence |
/set-headers |
POST | Set custom headers for all session requests |
/get-headers |
POST | Get all current session headers |
/get-cookies |
POST | Get all current session cookies |
/get-session-info |
POST | Get detailed session information |
/docs |
GET | Interactive Swagger API documentation |
π§ Configuration Options
- Environment Variables:
SERVER_HOST,SERVER_PORT,LOG_LEVEL - Configuration File: Optional
.envfile support - Flexible Deployment: Can run on any port, any interface
- Production Ready: Optimized for Windows Server environments
π Quick Start
- Download
HttpProxyServer.exe - Run the executable (no installation required)
- Access documentation at
http://localhost:5003/docs - Use REST API for authentication and proxying
πΌ Use Cases
- Web Scraping: Maintain authenticated sessions across requests
- API Integration: Bridge between systems requiring different authentication
- Legacy System Access: Modern REST interface for older authentication systems
- Development & Testing: Local proxy for development environments
- Corporate Applications: Navigate through corporate proxy requirements
π Migration from v1.x
This is a complete rewrite with:
- Improved session management
- Enhanced error handling
- Better logging system
- Modern FastAPI framework
- Comprehensive input validation
- Windows service compatibility
π Support & Documentation
- Full Documentation: Available at
/docswhen server is running - Health Check: Monitor service status via
/healthendpoint - Logging: Automatic logs in
HttpProxyServer.log - Author: Raul Mauricio UΓ±ate Castro
π·οΈ Technical Specifications
- Framework: FastAPI 0.100+
- Platform: Windows 10/11, Windows Server 2016+
- Size: 11.4 MB (includes all dependencies)
- Memory: ~50MB runtime footprint
- Language: Python 3.12 (compiled to native executable)
v2.3.0
π HTTP Proxy Server - Release Notes
Version 2.0.0 - Windows Executable
Release Date: January 15, 2026
π What is HTTP Proxy Server?
A standalone Windows executable that provides an HTTP proxy server with persistent session management, designed to act as a bridge between applications and external systems requiring authentication.
π― Key Features
- π’ Enterprise Ready: Designed for corporate environments with proxy support
- π Session Management: Automatic cookie and authentication handling
- π¦ Zero Dependencies: Single 11.4MB executable, no Python installation required
- π REST API: Complete FastAPI-based endpoints with Swagger documentation
- π Health Monitoring: Built-in connectivity and service health checks
- π Audit Logging: Comprehensive request/response logging for compliance
π‘οΈ Security & Reliability
- β SSL/TLS Support: Full HTTPS compatibility
- β Input Validation: Robust Pydantic V2 validation
- β Background Service: Runs silently without console window
- β Timeout Protection: Configurable timeouts prevent hanging requests
- β Error Handling: Graceful error management with detailed logging
π API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/health |
GET | Service and connectivity health check |
/login |
POST | Authentication and session initialization |
/logout |
POST | Session termination and cleanup |
/forward |
POST | HTTP request proxy with session persistence |
/set-headers |
POST | Set custom headers for all session requests |
/get-headers |
POST | Get all current session headers |
/get-cookies |
POST | Get all current session cookies |
/get-session-info |
POST | Get detailed session information |
/docs |
GET | Interactive Swagger API documentation |
π§ Configuration Options
- Environment Variables:
SERVER_HOST,SERVER_PORT,LOG_LEVEL - Configuration File: Optional
.envfile support - Flexible Deployment: Can run on any port, any interface
- Production Ready: Optimized for Windows Server environments
π Quick Start
- Download
HttpProxyServer.exe - Run the executable (no installation required)
- Access documentation at
http://localhost:5003/docs - Use REST API for authentication and proxying
πΌ Use Cases
- Web Scraping: Maintain authenticated sessions across requests
- API Integration: Bridge between systems requiring different authentication
- Legacy System Access: Modern REST interface for older authentication systems
- Development & Testing: Local proxy for development environments
- Corporate Applications: Navigate through corporate proxy requirements
π Migration from v1.x
This is a complete rewrite with:
- Improved session management
- Enhanced error handling
- Better logging system
- Modern FastAPI framework
- Comprehensive input validation
- Windows service compatibility
π Support & Documentation
- Full Documentation: Available at
/docswhen server is running - Health Check: Monitor service status via
/healthendpoint - Logging: Automatic logs in
HttpProxyServer.log - Author: Raul Mauricio UΓ±ate Castro
π·οΈ Technical Specifications
- Framework: FastAPI 0.100+
- Platform: Windows 10/11, Windows Server 2016+
- Size: 11.4 MB (includes all dependencies)
- Memory: ~50MB runtime footprint
- Language: Python 3.12 (compiled to native executable)
π New: Set Custom Headers
v2.2.0
π HTTP Proxy Server - Release Notes
Version 2.0.0 - Windows Executable
Release Date: January 15, 2026
π What is HTTP Proxy Server?
A standalone Windows executable that provides an HTTP proxy server with persistent session management, designed to act as a bridge between applications and external systems requiring authentication.
π― Key Features
- π’ Enterprise Ready: Designed for corporate environments with proxy support
- π Session Management: Automatic cookie and authentication handling
- π¦ Zero Dependencies: Single 11.4MB executable, no Python installation required
- π REST API: Complete FastAPI-based endpoints with Swagger documentation
- π Health Monitoring: Built-in connectivity and service health checks
- π Audit Logging: Comprehensive request/response logging for compliance
π‘οΈ Security & Reliability
- β SSL/TLS Support: Full HTTPS compatibility
- β Input Validation: Robust Pydantic V2 validation
- β Background Service: Runs silently without console window
- β Timeout Protection: Configurable timeouts prevent hanging requests
- β Error Handling: Graceful error management with detailed logging
π API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/health |
GET | Service and connectivity health check |
/login |
POST | Authentication and session initialization |
/logout |
POST | Session termination and cleanup |
/forward |
POST | HTTP request proxy with session persistence |
/set-headers |
POST | Set custom headers for all session requests |
/docs |
GET | Interactive Swagger API documentation |
π§ Configuration Options
- Environment Variables:
SERVER_HOST,SERVER_PORT,LOG_LEVEL - Configuration File: Optional
.envfile support - Flexible Deployment: Can run on any port, any interface
- Production Ready: Optimized for Windows Server environments
π Quick Start
- Download
HttpProxyServer.exe - Run the executable (no installation required)
- Access documentation at
http://localhost:5003/docs - Use REST API for authentication and proxying
πΌ Use Cases
- Web Scraping: Maintain authenticated sessions across requests
- API Integration: Bridge between systems requiring different authentication
- Legacy System Access: Modern REST interface for older authentication systems
- Development & Testing: Local proxy for development environments
- Corporate Applications: Navigate through corporate proxy requirements
π Migration from v1.x
This is a complete rewrite with:
- Improved session management
- Enhanced error handling
- Better logging system
- Modern FastAPI framework
- Comprehensive input validation
- Windows service compatibility
π Support & Documentation
- Full Documentation: Available at
/docswhen server is running - Health Check: Monitor service status via
/healthendpoint - Logging: Automatic logs in
HttpProxyServer.log - Author: Raul Mauricio UΓ±ate Castro
π·οΈ Technical Specifications
- Framework: FastAPI 0.100+
- Platform: Windows 10/11, Windows Server 2016+
- Size: 11.4 MB (includes all dependencies)
- Memory: ~50MB runtime footprint
- Language: Python 3.12 (compiled to native executable)
π New: Set Custom Headers
- Endpoint:
/set-headers - Purpose: Define custom HTTP headers for all future requests in the session.
- Example:
POST /set-headers { "Authorization": "Bearer token123", "X-Custom-Header": "CustomValue" }
- Use Case: Add authentication tokens or corporate headers globally.
Perfect for: Enterprise integration, API bridging, authenticated web scraping, development proxying, and legacy system modernization.
v2.1.0
π HTTP Proxy Server - Release Notes
Version 2.0.0 - Windows Executable
Release Date: January 15, 2026
π What is HTTP Proxy Server?
A standalone Windows executable that provides an HTTP proxy server with persistent session management, designed to act as a bridge between applications and external systems requiring authentication.
π― Key Features
- π’ Enterprise Ready: Designed for corporate environments with proxy support
- π Session Management: Automatic cookie and authentication handling
- π¦ Zero Dependencies: Single 11.4MB executable, no Python installation required
- π REST API: Complete FastAPI-based endpoints with Swagger documentation
- π Health Monitoring: Built-in connectivity and service health checks
- π Audit Logging: Comprehensive request/response logging for compliance
π‘οΈ Security & Reliability
- β SSL/TLS Support: Full HTTPS compatibility
- β Input Validation: Robust Pydantic V2 validation
- β Background Service: Runs silently without console window
- β Timeout Protection: Configurable timeouts prevent hanging requests
- β Error Handling: Graceful error management with detailed logging
π API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/health |
GET | Service and connectivity health check |
/login |
POST | Authentication and session initialization |
/logout |
POST | Session termination and cleanup |
/forward |
POST | HTTP request proxy with session persistence |
/docs |
GET | Interactive Swagger API documentation |
π§ Configuration Options
- Environment Variables:
SERVER_HOST,SERVER_PORT,LOG_LEVEL - Configuration File: Optional
.envfile support - Flexible Deployment: Can run on any port, any interface
- Production Ready: Optimized for Windows Server environments
π Quick Start
- Download
HttpProxyServer.exe - Run the executable (no installation required)
- Access documentation at
http://localhost:5003/docs - Use REST API for authentication and proxying
πΌ Use Cases
- Web Scraping: Maintain authenticated sessions across requests
- API Integration: Bridge between systems requiring different authentication
- Legacy System Access: Modern REST interface for older authentication systems
- Development & Testing: Local proxy for development environments
- Corporate Applications: Navigate through corporate proxy requirements
π Migration from v1.x
This is a complete rewrite with:
- Improved session management
- Enhanced error handling
- Better logging system
- Modern FastAPI framework
- Comprehensive input validation
- Windows service compatibility
π Support & Documentation
- Full Documentation: Available at
/docswhen server is running - Health Check: Monitor service status via
/healthendpoint - Logging: Automatic logs in
HttpProxyServer.log - Author: Raul Mauricio UΓ±ate Castro
π·οΈ Technical Specifications
- Framework: FastAPI 0.100+
- Platform: Windows 10/11, Windows Server 2016+
- Size: 11.4 MB (includes all dependencies)
- Memory: ~50MB runtime footprint
- Language: Python 3.12 (compiled to native executable)
Perfect for: Enterprise integration, API bridging, authenticated web scraping, development proxying, and legacy system modernization.
v2.0.0
HTTP Proxy Server - Windows Executable
π Description
This project provides an HTTP proxy server compiled as a Windows executable that runs completely in the background with no visible console.
β¨ Features
- β Standalone executable: No Python installation required
- β No visible console: Runs as a background service
- β Persistent sessions: Automatically maintains cookies and authentication
- β Full REST API: Endpoints for login, proxy, and health check
- β
Integrated documentation: Swagger UI available at
/docs - β
Detailed logging: Automatic logs in
.logfile - β Optimized size: Only 11.4 MB including all dependencies
π Quick Start
Option 1: Run directly
# Run the server (no console)
HttpProxyServer.exeπ Available Endpoints
π Health Check
GET http://localhost:5003/healthπ Login / Authentication
POST http://localhost:5003/login
Content-Type: application/json
{
"url": "https://sistema.empresa.com/login",
"method": "POST",
"data": {
"username": "user",
"password": "password"
},
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
}
}π Proxy / Request Forwarding
POST http://localhost:5003/forward
Content-Type: application/json
{
"url": "https://api.empresa.com/datos",
"method": "GET",
"headers": {
"Accept": "application/json"
}
}π Interactive Documentation
Once the server is running, access:
- Swagger UI: http://localhost:5003/docs
- ReDoc: http://localhost:5003/redoc
- Health Check: http://localhost:5003/health
π§ Advanced Configuration
Environment Variables
You can configure the server using environment variables:
# Set host and port
set SERVER_HOST=0.0.0.0
set SERVER_PORT=8080
# Set logging level
set LOG_LEVEL=debug
# Enable HTTP access logs
set ACCESS_LOG=true
# Run server
HttpProxyServer.exeConfiguration File
Create a .env file in the same folder as the executable:
SERVER_HOST=0.0.0.0
SERVER_PORT=5003
LOG_LEVEL=info
ACCESS_LOG=false
RELOAD=false
WORKERS=1π Logs and Debugging
Log Location
- Log file:
HttpProxyServer.log(same folder as the .exe)
Log Levels
debug: Very detailed informationinfo: General information (default)warning: Only warnings and errorserror: Errors only
Log Example
2026-01-15 20:49:00,123 [INFO] __main__ - FastAPI application initialized successfully
2026-01-15 20:49:00,124 [INFO] __main__ - HTTP session configured with User-Agent: Mozilla/5.0...
2026-01-15 20:49:01,456 [INFO] __main__ - Starting service health check
2026-01-15 20:49:01,789 [INFO] __main__ - Health check successful - Internet available
Stopping the Server
-
Task Manager:
Ctrl + Shift + Esc- Find "HttpProxyServer.exe"
- End process
-
Command line:
taskkill /f /im HttpProxyServer.exe
-
PowerShell:
Get-Process -Name "HttpProxyServer" | Stop-Process -Force
Check if Running
# Check process
tasklist | findstr HttpProxyServer
# Check connectivity
curl http://localhost:5003/healthπ Typical Workflow
1. Authentication
curl -X POST "http://localhost:5003/login" \
-H "Content-Type: application/json" \
-d '{
"url": "https://sistema.empresa.com/login",
"method": "POST",
"data": {
"username": "my_user",
"password": "my_password"
}
}'2. Make Authenticated Requests
curl -X POST "http://localhost:5003/forward" \
-H "Content-Type: application/json" \
-d '{
"url": "https://sistema.empresa.com/api/datos",
"method": "GET"
}'π¨ Troubleshooting
Port Already in Use
System error when starting server: [WinError 10048]
Only one usage of each socket address (protocol/network address/port) is normally permitted
Solution:
- Change the port:
set SERVER_PORT=8080 - Or terminate the existing process:
taskkill /f /im HttpProxyServer.exe
Permission Error
System error when starting server: [WinError 5] Access is denied
Solution:
- Run as Administrator
- Or use a port above 1024
No Internet Connectivity
{
"status": "Service Unavailable",
"internet": false,
"detail": "Timeout connecting to google.com"
}
Solution:
- Check your internet connection
- Check corporate proxy configuration
- Check firewall
π Security
- β SSL/TLS: Full HTTPS support
- β Input validation: Robust validation with Pydantic V2
- β Audit logging: Complete record of all operations
- β Security headers: User-Agent and corporate headers
- β Timeouts: Configurable to prevent DoS attacks
π Support
For issues or questions:
- Check the logs in
HttpProxyServer.log - Review the documentation at
/docs - Contact the developer: Raul Mauricio UΓ±ate Castro
π Developing New Features
- Clone the repository
git clone .....
cd http-proxy-server- Create a virtual environment and install dependencies
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt- Modify the code in
server.py
Version: 2.0.0
Date: January 15, 2026
Compatible with: Windows 10/11, Server 2016+