jee-r / docker-tinyproxy

A docker image for tinyproxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-tinyproxy

Docker Image Size (latest by date) GitHub Workflow Status (branch) Docker Pulls DockerHub ghcr.io

A docker image for tinyproxy.

What is a 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.

How to use these images

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

With Docker

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

With Docker Compose

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

Volume mounts

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 config tinyproxy.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

Environment variables

  • TZ: To change the timezone of the container set the TZ environment variable. The full list of available options can be found on Wikipedia.

Ports

  • 8888: Default local tinyproxy port

License

This project is under the GNU Generic Public License v3 to allow free use while ensuring it stays open.

About

A docker image for tinyproxy

License:GNU General Public License v3.0


Languages

Language:Dockerfile 66.7%Language:Shell 33.3%