Add support for the URI DNS Resource Record type
[resolv_wrapper.git] / doc / resolv_wrapper.1
1 '\" t
2 .\"     Title: resolv_wrapper
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5 .\"      Date: 2015-08-18
6 .\"    Manual: \ \&
7 .\"    Source: \ \&
8 .\"  Language: English
9 .\"
10 .TH "RESOLV_WRAPPER" "1" "2015\-08\-18" "\ \&" "\ \&"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 resolv_wrapper \- A wrapper for dns name resolving or dns faking\&.
32 .SH "SYNOPSIS"
33 .sp
34 LD_PRELOAD=libresolv_wrapper\&.so RESOLV_WRAPPER_CONF="/path/to/resolv\&.conf" \fB\&./myapplication\fR
35 .SH "DESCRIPTION"
36 .sp
37 resolv_wrapper makes it possible on most UNIX platforms to contact your own DNS implementation in your test environment\&. It requires socket_wrapper to be able to contact it\&. If it doesn\(cqt work on a special platform the wrapper is able to fake DNS queries and return valid responses to your application\&.
38 .sp
39 .RS 4
40 .ie n \{\
41 \h'-04'\(bu\h'+03'\c
42 .\}
43 .el \{\
44 .sp -1
45 .IP \(bu 2.3
46 .\}
47 Redirects name queries to the nameservers specified in your resolv\&.conf
48 .RE
49 .sp
50 .RS 4
51 .ie n \{\
52 \h'-04'\(bu\h'+03'\c
53 .\}
54 .el \{\
55 .sp -1
56 .IP \(bu 2.3
57 .\}
58 Can fake DNS queries using a simple formatted DNS hosts file\&.
59 .RE
60 .SH "ENVIRONMENT VARIABLES"
61 .PP
62 \fBRESOLV_WRAPPER_CONF\fR
63 .RS 4
64 This is used to specify the resolv\&.conf to use\&. The format of the resolv\&.conf file is defined in the manpage
65 \fIresolv\&.conf(5)\fR\&. Currently only the
66 \fBnamserver\fR
67 directive is supported\&.
68 .RE
69 .PP
70 \fBRESOLV_WRAPPER_HOSTS\fR
71 .RS 4
72 This environment variable is used for faking DNS queries\&. It must point to a hosts\-like text file that specifies fake records for custom queries\&. The format of the file looks like this:
73 .sp
74 .if n \{\
75 .RS 4
76 .\}
77 .nf
78 TYPE    RECORD_NAME RECORD_VALUE
79 .fi
80 .if n \{\
81 .RE
82 .\}
83 .RE
84 .sp
85 For example:
86 .sp
87 .if n \{\
88 .RS 4
89 .\}
90 .nf
91 A       dc\&.cwrap\&.org 127\&.0\&.0\&.10
92 AAAA    dc\&.cwrap\&.org fd00::5357:5f0a
93 CNAME   kerberos\&.cwrap\&.org dc\&.cwrap\&.org
94 SRV     _kerberos\&._tcp\&.cwrap\&.org kerberos\&.cwrap\&.org 88
95 URI     _vpn\&.cwrap\&.org https://vpn\&.cwrap\&.org/VPN
96 .fi
97 .if n \{\
98 .RE
99 .\}
100 .PP
101 \fBRESOLV_WRAPPER_DEBUGLEVEL\fR
102 .RS 4
103 If you need to see what is going on in resolv_wrapper itself or try to find a bug, you can enable logging support in resolv_wrapper if you built it with debug symbols\&.
104 .sp
105 .RS 4
106 .ie n \{\
107 \h'-04'\(bu\h'+03'\c
108 .\}
109 .el \{\
110 .sp -1
111 .IP \(bu 2.3
112 .\}
113 0 = ERROR
114 .RE
115 .sp
116 .RS 4
117 .ie n \{\
118 \h'-04'\(bu\h'+03'\c
119 .\}
120 .el \{\
121 .sp -1
122 .IP \(bu 2.3
123 .\}
124 1 = WARNING
125 .RE
126 .sp
127 .RS 4
128 .ie n \{\
129 \h'-04'\(bu\h'+03'\c
130 .\}
131 .el \{\
132 .sp -1
133 .IP \(bu 2.3
134 .\}
135 2 = DEBUG
136 .RE
137 .sp
138 .RS 4
139 .ie n \{\
140 \h'-04'\(bu\h'+03'\c
141 .\}
142 .el \{\
143 .sp -1
144 .IP \(bu 2.3
145 .\}
146 3 = TRACE
147 .RE
148 .RE
149 .SH "EXAMPLE"
150 .sp
151 The following command would trick \fIkinit(1)\fR into using DNS servers from "\&./resolv\&.conf" for Kerberos service resolution:
152 .sp
153 .if n \{\
154 .RS 4
155 .\}
156 .nf
157 $ LD_PRELOAD=libresolv_wrapper\&.so RESOLV_WRAPPER_CONF="\&./resolv\&.conf" kinit user@EXAMPLE\&.COM
158 .fi
159 .if n \{\
160 .RE
161 .\}