A docker image for tinyproxy.
From tinyproxy github repo:
Tinyproxy is a small, efficient HTTP/SSL proxy daemon released under the GNU General Public License. Tinyproxy is very useful in a small network setting, where a larger proxy would either be too resource intensive, or a security risk. One of the key features of Tinyproxy is the buffering connection concept. In effect, Tinyproxy will buffer a high speed response from a server, and then relay it to a client at the highest speed the client will accept. This feature greatly reduces the problems with sluggishness on the Internet. If you are sharing an Internet connection with a small network, and you only want to allow HTTP requests to be allowed, then Tinyproxy is a great tool for the network administrator.
- Official Website : https://tinyproxy.github.io/
- Config man page : https://man.archlinux.org/man/tinyproxy.conf.5.en
All the lines commented in the examples below should be adapted to your environment.
Note: --user $(id -u):$(id -g)
should work out of the box on linux systems. If your docker host run on windows or if you want specify an other user id and group id just replace with the appropriates values.
If you want use tinyproxy in combination with a proxy socks (upstream) take a look to my docker-proxy-socks image
docker run \
--detach \
--interactive \
--name proxy \
--user $(id -u):$(id -g) \
#--publish 8888:8888 \
--env TZ=Europe/Paris \
--volume /etc/localtime:/etc/localtime:ro \
--volume ./config:/config \
ghcr.io/jee-r/tinyproxy:latest
docker-compose
can help with defining the docker run
config in a repeatable way rather than ensuring you always pass the same CLI arguments.
Here's an example docker-compose.yml
config:
version: "3"
services:
tinyproxy:
image: ghcr.io/jee-r/tinyproxy:main
# build:
# context: .
# network: host
container_name: privoxy
restart: unless-stopped
user: 1000:1000
environment:
- TZ=Europe/Paris
ports:
- 8888:8888
volumes:
- ./tinyproxy.conf:/config/tinyproxy.conf
- /etc/localtime:/etc/localtime:ro
Due to the ephemeral nature of Docker containers these images provide a number of optional volume mounts to persist data outside of the container:
/config
contain your tinyproxy configtinyproxy.conf
/etc/localtime
: This directory allow to have the same time in the container as on the host.
You should create directory before run the container otherwise directories are created by the docker deamon and owned by the root user
TZ
: To change the timezone of the container set theTZ
environment variable. The full list of available options can be found on Wikipedia.
8888
: Default local tinyproxy port
This project is under the GNU Generic Public License v3 to allow free use while ensuring it stays open.