#query #server #dns2socks

bin+lib dns2socks

Convert DNS requests to SOCKS5 proxy

11 releases

Uses new Rust 2024

0.2.0 Mar 5, 2025
0.1.9 Jan 28, 2025
0.1.8 Dec 17, 2024
0.1.7 Nov 23, 2024
0.1.3 Mar 30, 2024

#1471 in Network programming

Download history 2/week @ 2024-12-04 89/week @ 2024-12-11 53/week @ 2024-12-18 2/week @ 2025-01-08 64/week @ 2025-01-22 53/week @ 2025-01-29 10/week @ 2025-02-05 5/week @ 2025-02-26 148/week @ 2025-03-05 2/week @ 2025-03-12 5/week @ 2025-03-19

160 downloads per month

MIT and GPL-3.0-or-later

40KB
836 lines

dns2socks

Crates.io dns2socks Documentation Download License

A DNS server that forwards DNS requests to a SOCKS5 server.

Installation

Precompiled Binaries

Download binary from releases and put it in your $PATH.

Install from Crates.io

If you have Rust toolchain installed, you can install dns2socks with the following command:

cargo install dns2socks

Usage

dns2socks -h

Proxy server to routing DNS query to SOCKS5 server

Usage: dns2socks [OPTIONS]

Options:
  -l, --listen-addr <IP:port>        Listen address [default: 0.0.0.0:53]
  -d, --dns-remote-server <IP:port>  Remote DNS server address [default: 8.8.8.8:53]
  -s, --socks5-server <IP:port>      SOCKS5 proxy server address [default: 127.0.0.1:1080]
  -u, --username <user name>         User name for SOCKS5 authentication
  -p, --password <password>          Password for SOCKS5 authentication
  -f, --force-tcp                    Force to use TCP to proxy DNS query
  -c, --cache-records                Cache DNS query records
  -v, --verbosity <level>            Verbosity level [default: info] [possible values: off, error, warn, info, debug, trace]
  -t, --timeout <seconds>            Timeout for DNS query [default: 5]
  -h, --help                         Print help
  -V, --version                      Print version

Dependencies

~18–48MB
~762K SLoC