From 49281a99a4c9919616f62fd546af445614bc6d64 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 8 Apr 2025 22:43:16 +0200 Subject: [PATCH] initial --- .gitignore | 5 +++++ Dockerfile | 18 ++++++++++++++++++ start.sh | 4 ++++ tinyproxy.conf.m4 | 21 +++++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100755 start.sh create mode 100644 tinyproxy.conf.m4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d2ed908 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*~ +.*~ +ENV +ENV.test +tmp/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8eb11ff --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM alpine:3.21.3 + +LABEL Maintainer="Wolfgang Hottgenroth " + +ENV ALLOWED_NETWORK="127.0.0.1/32" + +RUN apk add --no-cache tinyproxy m4 + +COPY tinyproxy.conf.m4 /etc/tinyproxy +COPY start.sh /etc/tinyproxy + +WORKDIR /etc/tinyproxy + +EXPOSE 3128 + +CMD [ "./start.sh" ] + + diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..cea8698 --- /dev/null +++ b/start.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +m4 tinyproxy.conf.m4 > tinyproxy.conf && tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf + diff --git a/tinyproxy.conf.m4 b/tinyproxy.conf.m4 new file mode 100644 index 0000000..4c279d2 --- /dev/null +++ b/tinyproxy.conf.m4 @@ -0,0 +1,21 @@ +dnl values +define(`ALLOWED_NETWORK', esyscmd(`echo -n $ALLOWED_NETWORK'))dnl + + +dnl -------------------------------------------------------------- +dnl template for tinyproxy.conf + +Port 3128 +Listen 0.0.0.0 + +User nobody +Group nobody + +LogLevel Info + +Allow ALLOWED_NETWORK + +ConnectPort 443 + +Timeout 600 +