mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-06-02 23:07:27 +02:00
fix privoxy
This commit is contained in:
parent
095e65c132
commit
50f5eaff4f
@ -16,6 +16,7 @@ networks.
|
|||||||
~/fig/privoxy/
|
~/fig/privoxy/
|
||||||
├── docker-compose.yml
|
├── docker-compose.yml
|
||||||
└── privoxy/
|
└── privoxy/
|
||||||
|
├── config
|
||||||
├── user.action
|
├── user.action
|
||||||
└── user.filter
|
└── user.filter
|
||||||
```
|
```
|
||||||
@ -23,16 +24,17 @@ networks.
|
|||||||
file: docker-compose.yml
|
file: docker-compose.yml
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
privoxy:
|
version: "3.8"
|
||||||
image: vimagick/privoxy
|
services:
|
||||||
ports:
|
privoxy:
|
||||||
- "8118:8118"
|
image: vimagick/privoxy
|
||||||
volumes:
|
ports:
|
||||||
- ./privoxy/user.action:/etc/privoxy/user.action
|
- "8118:8118"
|
||||||
- ./privoxy/user.filter:/etc/privoxy/user.filter
|
volumes:
|
||||||
cap_add:
|
- ./data/config:/etc/privoxy/config
|
||||||
- NET_ADMIN
|
- ./data/user.action:/etc/privoxy/user.action
|
||||||
restart: always
|
- ./data/user.filter:/etc/privoxy/user.filter
|
||||||
|
restart: unless-stopped
|
||||||
```
|
```
|
||||||
|
|
||||||
file: user.action
|
file: user.action
|
||||||
@ -44,7 +46,7 @@ file: user.action
|
|||||||
{+block}
|
{+block}
|
||||||
127.0.0.1
|
127.0.0.1
|
||||||
45.32.57.113
|
45.32.57.113
|
||||||
.easypi.info
|
.easypi.duckdns.org
|
||||||
```
|
```
|
||||||
|
|
||||||
> :warning: Make sure you block ip/domain which point to server itself.
|
> :warning: Make sure you block ip/domain which point to server itself.
|
||||||
@ -63,23 +65,26 @@ $ cd ~/fig/privoxy/
|
|||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
$ docker-compose logs
|
$ docker-compose logs
|
||||||
Attaching to privoxy_privoxy_1
|
Attaching to privoxy_privoxy_1
|
||||||
privoxy_1 | 2015-06-28 17:47:32.838 7ff17bdb5048 Info: Privoxy version 3.0.23
|
privoxy_1 | 2023-08-28 17:47:32.838 7ff17bdb5048 Info: Privoxy version 3.0.34
|
||||||
privoxy_1 | 2015-06-28 17:47:32.838 7ff17bdb5048 Info: Program name: privoxy
|
privoxy_1 | 2023-08-28 17:47:32.838 7ff17bdb5048 Info: Program name: privoxy
|
||||||
privoxy_1 | 2015-06-28 17:47:32.839 7ff17bdb5048 Info: Loading filter file: /etc/privoxy/default.filter
|
privoxy_1 | 2023-08-28 17:47:32.839 7ff17bdb5048 Info: Loading filter file: /etc/privoxy/default.filter
|
||||||
privoxy_1 | 2015-06-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 filter file: /etc/privoxy/user.filter
|
||||||
privoxy_1 | 2015-06-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/match-all.action
|
||||||
privoxy_1 | 2015-06-28 17:47:32.845 7ff17bdb5048 Info: Loading actions file: /etc/privoxy/default.action
|
privoxy_1 | 2023-08-28 17:47:32.845 7ff17bdb5048 Info: Loading actions file: /etc/privoxy/default.action
|
||||||
privoxy_1 | 2015-06-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: Loading actions file: /etc/privoxy/user.action
|
||||||
privoxy_1 | 2015-06-28 17:47:32.852 7ff17bdb5048 Info: Listening on port 8118 on IP address 0.0.0.0
|
privoxy_1 | 2023-08-28 17:47:32.852 7ff17bdb5048 Info: Listening on port 8118 on IP address 0.0.0.0
|
||||||
privoxy_1 | 2015-06-28 17:48:27.607 7ff17bff3ab0 Request: www.example.org/
|
privoxy_1 | 2023-08-28 17:48:27.607 7ff17bff3ab0 Request: www.example.org/
|
||||||
privoxy_1 | 2015-06-28 17:48:53.069 7ff17bff3ab0 Request: www.example.org/
|
privoxy_1 | 2023-08-28 17:48:53.069 7ff17bff3ab0 Request: www.example.org/
|
||||||
```
|
```
|
||||||
|
|
||||||
## client
|
## client
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ http_proxy=127.0.0.1:8118 wget -O- http://www.example.org
|
$ docker network ls
|
||||||
$ docker run --rm --net container:privoxy_privoxy_1 alpine wget -O- http://www.example.org
|
$ 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
|
||||||
```
|
```
|
||||||
|
|
||||||
In both cases, you will see `<style>img{transform: rotate(180deg);}</style></head>` in output.
|
In both cases, you will see `<style>img{transform: rotate(180deg);}</style></head>` in output.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user