mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-03 13:20:32 +00:00
Improve Docker support description
This commit is contained in:
parent
fc4d29dd2e
commit
d75488f1d8
1 changed files with 10 additions and 5 deletions
15
README.md
15
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue