https://github.com/tun2proxy/dns2socks
A DNS server that forwards DNS requests to a SOCKS5 server.
https://github.com/tun2proxy/dns2socks
Last synced: 5 months ago
JSON representation
A DNS server that forwards DNS requests to a SOCKS5 server.
- Host: GitHub
- URL: https://github.com/tun2proxy/dns2socks
- Owner: tun2proxy
- License: mit
- Created: 2024-03-12T16:14:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-12-31T13:45:52.000Z (5 months ago)
- Last Synced: 2026-01-14T11:41:07.728Z (5 months ago)
- Language: Rust
- Homepage:
- Size: 50.8 KB
- Stars: 46
- Watchers: 3
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dns2socks
[](https://crates.io/crates/dns2socks)

[](https://docs.rs/dns2socks)
[](https://crates.io/crates/dns2socks)
[](https://github.com/ssrlive/dns2socks/blob/master/LICENSE)
A DNS server that forwards DNS requests to a SOCKS5 server.
## Installation
### Precompiled Binaries
Download binary from [releases](https://github.com/ssrlive/dns2socks/releases) and put it in your `$PATH`.
### Install from Crates.io
If you have [Rust](https://rustup.rs/) toolchain installed, you can install `dns2socks` with the following command:
```sh
cargo install dns2socks
```
## Usage
```plaintext
dns2socks -h
Proxy server to routing DNS query to SOCKS5 server
Usage: dns2socks [OPTIONS]
Options:
-l, --listen-addr Listen address [default: 0.0.0.0:53]
-d, --dns-remote-server Remote DNS server address [default: 8.8.8.8:53]
-s, --socks5-settings SOCKS5 URL in the form socks5://[username[:password]@]host:port, Username and password are encoded in percent
encoding. For example: socks5://myname:pass%40word@127.0.0.1:1080 [default: socks5://127.0.0.1:1080]
-f, --force-tcp Force to use TCP to proxy DNS query
-c, --cache-records Cache DNS query records
-v, --verbosity Verbosity level [default: info] [possible values: off, error, warn, info, debug, trace]
-t, --timeout Timeout for DNS query [default: 5]
-h, --help Print help
-V, --version Print version
```