.\" comment
.TH "tdns\-clt\-proxy" "7" "27 May 2015" "1.0" "tdns-clt-proxy man page"
.SH "NAME"
.B tdns\-clt\-proxy
\- a DNS client side proxy to forward queries from local application over TCP or TLS (STARTTLS or direct TLS) to a recursive DNS server, and forward responses back to local applications.
.SH "SYNOPSIS"
.B tdns\-clt\-proxy
.RB [ \-h ]
.RB [ \-a
.IR IP ]
.RB [ \-l
.IR port ]
.RB [ \-s
.IR IP ]
.RB [ \-p
.IR port ]
.RB [ \-t
.IR connection ]
.SH "DESCRIPTION"
.B tdns\-clt\-proxy
receives UDP based DNS queries from local application, and forwards the queries over TCP or TLS to a recursive DNS server. 
.PP
It also receives the DNS responses from the DNS server, and forwards the responses to local application over UDP.
.PP
The DNS server this proxy points to must support the given protocol, for example direct TLS and STARTLS.
.PP
Current unbound supports queries over TLS connectoins.
The mechanism to do STARTTLS for DNS is described in
https://tools.ietf.org/html/draft-ietf-dprive-start-tls-for-dns-00.
To accomplish STARTLS for DNS, tdns-svr-proxy can be used to pair with this client side proxy.
.SH "OPTIONS"
.TP
.B \-h
Show option help.
.TP
.B \-a \fIIP
the local IP address to listen on, default is 127.0.0.1
.TP
.B \-l \fIport
the local port to listen on, default is 53
.TP
.B \-s \fIIP
the IP address of DNS server
.TP
.B \-p \fIport
the port number of DNS server, default is 53
.TP
.B \-t \fIconnection
the type of connection for the queries forwarded to DNS server. It could be TCP, TLS, STARTTLS (default)
.SH "SET UP"
.PP
ldns, libevent, openssl are required to compile and run.
.PP
After running this proxy, you need to edit /etc/resolv.conf to make sure the only nameserver is the listened IP (option -a), so that all the DNS queries will go through this proxy.  
.SH "EXAMPLE"
.TP
tdns\-clt\-proxy -s 1.2.3.4 -p 53 -l 127.0.0.1 -a 53 -t STARTTLS
.SH "SEE ALSO"
tdns-svr-proxy(3)
.".SH BUGS
."No known bugs.
.SH "AUTHOR"
Liang Zhu (liangzhu@usc.edu)
