mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-22 14:59:09 +00:00
Explain DNS feature in README
This commit is contained in:
parent
6b7f550e7a
commit
7d3e37b1d9
1 changed files with 14 additions and 7 deletions
15
README.md
15
README.md
|
@ -36,8 +36,13 @@ sudo ip route add 0.0.0.0/1 dev tun0
|
||||||
Note that if you paste these commands into a shell script, which you then run with `sudo`, you might want to replace
|
Note that if you paste these commands into a shell script, which you then run with `sudo`, you might want to replace
|
||||||
`$USER` with `$SUDO_USER`.
|
`$USER` with `$SUDO_USER`.
|
||||||
|
|
||||||
For DNS to work, you might need an additional tool like [dnsproxy](https://github.com/AdguardTeam/dnsproxy) that is
|
This tool implements a virtual DNS feature that is used by default. When a DNS packet to port 53 is detected, an IP
|
||||||
configured to listen on a local UDP port and communicates with the upstream DNS server via TCP.
|
address from `198.18.0.0/15` is chosen and mapped to the query name. Connections destined for an IP address from that
|
||||||
|
range will supply the proxy with the mapped query name instead of the IP address. Since many proxies do not support UDP,
|
||||||
|
this enables an out-of-the-box experience in most cases, without relying on third-party resolvers or applications.
|
||||||
|
Depending on your use case, you may want to disable this feature using `--dns none`.
|
||||||
|
In that case, you might need an additional tool like [dnsproxy](https://github.com/AdguardTeam/dnsproxy) that is
|
||||||
|
configured to listen on a local UDP port and communicates with a third-party upstream DNS server via TCP.
|
||||||
|
|
||||||
When you terminate this program and want to eliminate the impact caused by the above several commands,
|
When you terminate this program and want to eliminate the impact caused by the above several commands,
|
||||||
you can execute the following command. The routes will be automatically deleted with the tunnel device.
|
you can execute the following command. The routes will be automatically deleted with the tunnel device.
|
||||||
|
@ -53,7 +58,8 @@ Usage: tun2proxy [OPTIONS] --proxy <URL>
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-t, --tun <name> Name of the tun interface [default: tun0]
|
-t, --tun <name> Name of the tun interface [default: tun0]
|
||||||
-p, --proxy <URL> The proxy URL in the form proto://[username[:password]@]host:port
|
-p, --proxy <URL> Proxy URL in the form proto://[username[:password]@]host:port
|
||||||
|
-d, --dns <method> DNS handling [default: virtual] [possible values: virtual, none]
|
||||||
-h, --help Print help
|
-h, --help Print help
|
||||||
-V, --version Print version
|
-V, --version Print version
|
||||||
```
|
```
|
||||||
|
@ -62,5 +68,6 @@ 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.
|
supplied as `--proxy http://john.doe:secret@1.2.3.4:3128`. This works analogously to curl's `--proxy` argument.
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
- Increase error robustness (reduce `unwrap` and `expect` usage)
|
||||||
- UDP support for SOCKS
|
- UDP support for SOCKS
|
||||||
- Virtual DNS
|
- Native support for proxying DNS over TCP or TLS
|
||||||
|
|
Loading…
Add table
Reference in a new issue