master
Pietro Brenna 2022-02-01 14:12:03 +01:00
commit 30f4cbd113
4 changed files with 37 additions and 0 deletions

7
Dockerfile 100644
View File

@ -0,0 +1,7 @@
FROM alpine:edge
RUN apk add --update --no-cache privoxy
ADD bin /bin
RUN set -e && cd /etc/privoxy && for x in *.new; do mv $x $(basename "$x" .new); done
USER privoxy
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["start.sh"]

10
Readme.md 100644
View File

@ -0,0 +1,10 @@
### Alpine Privoxy
## Usage
Privoxy listens to 8118. add whitelisted sites with the ~ prefix to the command line
Sample command
```bash
docker run -d -p 8118:8118 docker.briq.it/privoxy_whitelist ~ci.briq.it
```

View File

@ -0,0 +1,17 @@
#!/bin/sh
sed -i "/^listen\-address/d" /etc/privoxy/config
sed -i "/^enforce\-blocks/d" /etc/privoxy/config
echo "
listen-address 0.0.0.0:8118
enforce-blocks 1
trustfile /tmp/privoxy-trust" >> /etc/privoxy/config
for arg; do
echo >&2 "adding $arg to trust file"
echo "$arg" >> /tmp/privoxy-trust
done
#echo "Configuration: $(cat /etc/privoxy/config)"
exec start.sh

3
bin/start.sh 100755
View File

@ -0,0 +1,3 @@
#!/bin/sh
echo >&2 "Privoxy starting"
exec privoxy --no-daemon /etc/privoxy/config