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+