generated from nathanwoodburn/python-webserver-template
All checks were successful
Build Docker / BuildImage (push) Successful in 54s
python-webserver-template
Python3 website template including git actions
Proxy PAC Server
A Python-based web server for hosting a Proxy Auto-Configuration (PAC) file. The server is built with Flask and can be deployed using Docker.
Features
- Serves a dynamic proxy.pac file
- Automatically skips all IANA registered TLDs (from https://data.iana.org/TLD/tlds-alpha-by-domain.txt)
- Configurable proxy address and additional TLDs to bypass
- Simple web interface
Configuration
Environment variables can be used to configure the server:
WORKERS: Number of Gunicorn workers (default: 1)THREADS: Number of threads per worker (default: 2)PROXY_ADDRESS: The proxy server address (default: 127.0.0.1:8080)ADDITIONAL_SKIP_TLDS: Comma-separated list of additional TLDs to bypass the proxy
Usage
- Clone the repository
- Copy
.env.exampleto.envand modify as needed - Run the server with Docker or Python
Docker
docker build -t proxy-pac-server .
docker run -p 5000:5000 --env-file .env proxy-pac-server
Python
pip install -r requirements.txt
python main.py
The PAC file will be available at http://your-server:5000/proxy.pac
Description
Languages
Python
79.1%
HTML
11.7%
CSS
5.7%
Dockerfile
3.5%