diff --git a/README.md b/README.md index 0c19917..691c7eb 100644 --- a/README.md +++ b/README.md @@ -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:secret@1.2.3.4:3128`. This works analogously to curl's `--proxy` argument. ## 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 docker run -d \ @@ -118,20 +125,18 @@ docker run -d \ --sysctl net.ipv6.conf.default.disable_ipv6=0 \ --cap-add NET_ADMIN \ --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 docker run -it \ -d \ --network "container:tun2proxy" \ - worker-example:tags + ubuntu:latest ``` - - ## Configuration Tips ### DNS When DNS resolution is performed by a service on your machine or through a server in your local network, DNS resolution