1 changed files with 10 additions and 5 deletions
@ -109,6 +109,13 @@ URL format. For example, an HTTP proxy at `1.2.3.4:3128` with a username of `joh |
|||||
supplied as `--proxy http://john.doe:[email protected]:3128`. This works analogously to curl's `--proxy` argument. |
supplied as `--proxy http://john.doe:[email protected]:3128`. This works analogously to curl's `--proxy` argument. |
||||
|
|
||||
## Docker Support |
## Docker Support |
||||
|
Tun2proxy can serve as a proxy for other Docker containers. To make use of that feature, first build the image: |
||||
|
|
||||
|
```bash |
||||
|
docker build -t tun2proxy . |
||||
|
``` |
||||
|
|
||||
|
Next, start a container from the tun2proxy image: |
||||
|
|
||||
```bash |
```bash |
||||
docker run -d \ |
docker run -d \ |
||||
@ -118,20 +125,18 @@ docker run -d \ |
|||||
--sysctl net.ipv6.conf.default.disable_ipv6=0 \ |
--sysctl net.ipv6.conf.default.disable_ipv6=0 \ |
||||
--cap-add NET_ADMIN \ |
--cap-add NET_ADMIN \ |
||||
--name tun2proxy \ |
--name tun2proxy \ |
||||
image:tags |
tun2proxy |
||||
``` |
``` |
||||
|
|
||||
Provide a network to another worker container. (share netns). |
You can then provide the running container's network to another worker container by sharing the network namespace: |
||||
|
|
||||
```bash |
```bash |
||||
docker run -it \ |
docker run -it \ |
||||
-d \ |
-d \ |
||||
--network "container:tun2proxy" \ |
--network "container:tun2proxy" \ |
||||
worker-example:tags |
ubuntu:latest |
||||
``` |
``` |
||||
|
|
||||
|
|
||||
|
|
||||
## Configuration Tips |
## Configuration Tips |
||||
### DNS |
### DNS |
||||
When DNS resolution is performed by a service on your machine or through a server in your local network, DNS resolution |
When DNS resolution is performed by a service on your machine or through a server in your local network, DNS resolution |
||||
|
|||||
Loading…
Reference in new issue