2015-06-28 18:58:36 +02:00
|
|
|
privoxy
|
|
|
|
=======
|
|
|
|
|
2016-06-04 10:18:42 +02:00
|
|
|
![](https://badge.imagelayers.io/vimagick/privoxy:latest.svg)
|
2015-06-28 19:52:38 +02:00
|
|
|
|
2016-06-04 10:18:42 +02:00
|
|
|
[Privoxy][1] is a non-caching web proxy with advanced filtering capabilities for
|
2015-06-28 18:58:36 +02:00
|
|
|
enhancing privacy, modifying web page data and HTTP headers, controlling
|
|
|
|
access, and removing ads and other obnoxious Internet junk. Privoxy has a
|
|
|
|
flexible configuration and can be customized to suit individual needs and
|
|
|
|
tastes. It has application for both stand-alone systems and multi-user
|
|
|
|
networks.
|
2015-06-28 19:52:38 +02:00
|
|
|
|
|
|
|
## directory tree
|
|
|
|
|
|
|
|
```
|
|
|
|
~/fig/privoxy/
|
|
|
|
├── docker-compose.yml
|
|
|
|
└── privoxy/
|
2023-08-28 11:12:32 +02:00
|
|
|
├── config
|
2015-06-28 19:52:38 +02:00
|
|
|
├── user.action
|
|
|
|
└── user.filter
|
|
|
|
```
|
|
|
|
|
|
|
|
file: docker-compose.yml
|
|
|
|
|
2016-06-04 10:18:42 +02:00
|
|
|
```yaml
|
2023-08-28 11:12:32 +02:00
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
|
|
privoxy:
|
|
|
|
image: vimagick/privoxy
|
|
|
|
ports:
|
|
|
|
- "8118:8118"
|
|
|
|
volumes:
|
|
|
|
- ./data/config:/etc/privoxy/config
|
|
|
|
- ./data/user.action:/etc/privoxy/user.action
|
|
|
|
- ./data/user.filter:/etc/privoxy/user.filter
|
|
|
|
restart: unless-stopped
|
2015-06-28 19:52:38 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
file: user.action
|
|
|
|
|
|
|
|
```
|
|
|
|
{+filter{rot}}
|
|
|
|
/
|
2015-06-29 04:43:41 +02:00
|
|
|
|
|
|
|
{+block}
|
|
|
|
127.0.0.1
|
2016-06-04 10:18:42 +02:00
|
|
|
45.32.57.113
|
2023-08-28 11:12:32 +02:00
|
|
|
.easypi.duckdns.org
|
2015-06-28 19:52:38 +02:00
|
|
|
```
|
|
|
|
|
2016-06-04 10:18:42 +02:00
|
|
|
> :warning: Make sure you block ip/domain which point to server itself.
|
2015-06-29 06:33:18 +02:00
|
|
|
|
2015-06-28 19:52:38 +02:00
|
|
|
file: user.filter
|
|
|
|
|
|
|
|
```
|
|
|
|
FILTER: rot rotate image
|
|
|
|
s|</head>|<style>img{transform: rotate(180deg);}</style></head>|gisU
|
|
|
|
```
|
|
|
|
|
|
|
|
## server
|
|
|
|
|
2016-06-04 10:18:42 +02:00
|
|
|
```bash
|
2015-06-28 19:52:38 +02:00
|
|
|
$ cd ~/fig/privoxy/
|
|
|
|
$ docker-compose up -d
|
|
|
|
$ docker-compose logs
|
|
|
|
Attaching to privoxy_privoxy_1
|
2023-08-28 11:12:32 +02:00
|
|
|
privoxy_1 | 2023-08-28 17:47:32.838 7ff17bdb5048 Info: Privoxy version 3.0.34
|
|
|
|
privoxy_1 | 2023-08-28 17:47:32.838 7ff17bdb5048 Info: Program name: privoxy
|
|
|
|
privoxy_1 | 2023-08-28 17:47:32.839 7ff17bdb5048 Info: Loading filter file: /etc/privoxy/default.filter
|
|
|
|
privoxy_1 | 2023-08-28 17:47:32.845 7ff17bdb5048 Info: Loading filter file: /etc/privoxy/user.filter
|
|
|
|
privoxy_1 | 2023-08-28 17:47:32.845 7ff17bdb5048 Info: Loading actions file: /etc/privoxy/match-all.action
|
|
|
|
privoxy_1 | 2023-08-28 17:47:32.845 7ff17bdb5048 Info: Loading actions file: /etc/privoxy/default.action
|
|
|
|
privoxy_1 | 2023-08-28 17:47:32.852 7ff17bdb5048 Info: Loading actions file: /etc/privoxy/user.action
|
|
|
|
privoxy_1 | 2023-08-28 17:47:32.852 7ff17bdb5048 Info: Listening on port 8118 on IP address 0.0.0.0
|
|
|
|
privoxy_1 | 2023-08-28 17:48:27.607 7ff17bff3ab0 Request: www.example.org/
|
|
|
|
privoxy_1 | 2023-08-28 17:48:53.069 7ff17bff3ab0 Request: www.example.org/
|
2015-06-28 19:52:38 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## client
|
|
|
|
|
2016-06-04 10:18:42 +02:00
|
|
|
```bash
|
2023-08-28 11:12:32 +02:00
|
|
|
$ docker network ls
|
|
|
|
$ docker run --rm --network privoxy_default alpine wget -O- http://www.example.org
|
|
|
|
|
|
|
|
$ export http_proxy=127.0.0.1:8118
|
|
|
|
$ wget -O- http://www.example.org
|
2015-06-28 19:52:38 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
In both cases, you will see `<style>img{transform: rotate(180deg);}</style></head>` in output.
|
2016-06-04 10:18:42 +02:00
|
|
|
|
|
|
|
[1]: https://www.privoxy.org/
|