Public | Automated Build

Last pushed: 19 days ago
Short Description
HTTP/HTTPS proxy using Squid (3) to log API usage & HTTP(s) response codes.
Full Description

API Proxy (Squid 3)

HTTP/HTTPS proxy using Squid (3) to log API usage & HTTP(s) response codes.

What does it do

It's a Squid Proxy server based on Alpine. It allows incoming connections to TCP port 3128 visiting HTTP or HTTPS locations. All requests will be logged to /var/log/squid/access.log. Domain, user (auth) and HTTP Response code (200, etc.) and round-trip response-time will be logged.

Auth (basic) is required, however: all user+pass combinations are OK (a python script takes care of this). Auth is only used for logging the user / container that requested an API call.

Cache is disabled. To limit the # of IP's with access you can change the config (acl localhet) or use iptables/ufw/etc. to limit access to port 3128.

Why

At nodum.io we use this container for all API calls. It helps us monitoring / debug API-calls for users / applications.

How

Build

docker build --tag nodum/squid:latest .

Run

To run and auto-remove after running, while storing logs locally:

docker run --rm -p 3128:3128 -v ~/squid-log/:/var/log/squid/ nodum/squid:latest

To run in the background + name the container squid while storing logs locally:

docker run -d --name squid -p 3128:3128 \
           -v ~/squid-log/:/var/log/squid/ \
       nodum/squid:latest
Docker Pull Command
Owner
nodum
Source Repository

Comments (0)