summaryrefslogtreecommitdiff
path: root/contrib/idn/mdnkit/doc/en/guide/resolvconfig.html
blob: b3b992e80240517a038d8d2b49e224d873482581 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<!-- $Id: resolvconfig.html,v 1.1 2001/03/05 12:58:01 tale Exp $ -->
<html>
<head>
<title>Configuring mDNkit resolver</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>

<body>
<h1><a name="resolvconfig">mDNkit ]õRtBM[V</a></h1>
<h1><a name="resolvconfig">mDNkit Resolver Configuration</a></h1>

<p>mDNkit 񋟂c[AR}ĥAdnsproxy ȊỐA‚܂ runmdn  mdnconv ͋ʂ̐ݒt@CQƂ܂B
܂ bind9 pb`ݒt@CQƂ܂B

<p>runmdn and mdnconv, commands and tools that the mDNkit provides in addition to dnsproxy, reference the shared configuration file.
The bind9 patch also references the same configuration file.
<p>̃t@Cɂ mDNkit 𗘗pNCAg邢̓]oKvƂ邢‚̏ݒ肷Kv܂B
ႦΐK̕ DNS vgRŗphC̃GR[fBO@Ȃǂ̃t@CŎw肵܂B
ł́Ȁ̐ݒ@ƈӖƂ܂B
<p>A number of data items that the client or resolver needs, in order to be able to use the mDNkit, must be entered in this file.
For example, the normalization scheme and the domain name encoding scheme in the DNS protocol are specified in this file.
The procedure for entering this data, and its significance, are described below.

<p>܂AAvP[V̎gp郍[JGR[fBO̓AvP[V̓삷郍P[񂩂擾܂Bɂ‚Ă킹Đ܂B
<p>The local encoding used by the application is acquired from the locale information of the application.

<ul>
<li><a href="#config-file">RtBM[Vt@C</a>
<li><a href="#config-file">Configuration file</a>
<li><a href="#config-data">RtBM[Vf[^</a>
<li><a href="#config-data">Configuration data</a>
    <ul>
    <li><a href="#server-encoding">server-encoding</a>
    <li><a href="#server-zld">server-zld</a>
    <li><a href="#normalize">normalize</a>
    <li><a href="#alternate-encoding">alternate-encoding</a>
    <li><a href="#alias-file">alias-file</a>
    </ul>
<li><a href="#local-encoding">[JGR[fBOɂ‚</a>
<li><a href="#local-encoding">Local Encoding</a>
</ul>

<hr>
<h2><a name="config-file">RtBM[Vt@C</a></h2>
<h2><a name="config-file">Configuration File</a></h2>
<p>
mDNkit ̐ݒ́ARtBM[Vt@Cɂčs܂B
mDNkit ftHg̐ݒŃRpCꍇɂ́ÃRtBM[Vt@C̃pX͂ƂȂ܂B
<p>mDNkit is set up using the configuration file.
When mDNkit is compiled in the default setting, the path name of the configuration file becomes the following.
<blockquote>
<pre>
/usr/local/etc/mdnres.conf
</pre>
</blockquote>
fBNgA‚܂ <tt>/usr/local/etc</tt> mDNkit ̐ݒ莞<a href="install.html#sysconfdir">IvV</a>ŕύX”\łB
<p>The directory, <tt>/usr/local/etc</tt>, can be changed using <a href="install.html#sysconfdir">option</a> when setting up the mDNkit.

<p>mDNkit CXg[ƁÃt@C̃Tvt@C(ftHg̐ݒ̏ꍇ) ɃCXg[܂B
<p>When mDNkit is installed, a sample file of this file is installed (when the default setting is used).
<blockquote>
<pre>
/usr/local/etc/mdnres.conf.sample
</pre>
</blockquote>
̃Tvt@Cɂ͐ݒ荀ڂƂ̐Ă܂̂ŁARtBM[Vt@C쐬̎QlɂĂB
<p>This sample file contains the setting items and their descriptions. Use this information as reference in generating the configuration file.

<p>

<hr>
<h2><a name="config-data">RtBM[Vf[^</a></h2>
<h2><a name="config-data">Configuration Data</a></h2>
<p>
RtBM[Vt@C͒ʏ̃eLXgt@CŁAȉ̃RtBM[Vf[^w肵܂B
<p>
The configuration file is a text file, and specifies the following configuration data.

<dl>

<dt><a name="server-encoding">server-encoding</a>
<dd>
DNS vgRgpGR[fBOw肵܂B
<p>Specifies the encoding used by a DNS protocol.
<blockquote>
<tt>server-encoding </tt><em>encoding</em>
</blockquote>
<em>encoding</em> ɃGR[fBOw肵܂B
<em>encoding</em> specifies the encoding name.

<blockquote>
<dl>
<dt>[ݒ]
<dt>[Setting example]
<dd>
<pre>
server-encoding RACE
server-encoding UTF-8
</pre>
</dl>
</blockquote>

ȂAAvP[Ṽ[JGR[fBO̓P[ɂČ܂̂ŁAclient-encoding ƂGg͂܂B
[JGR[fBOɊւĂ<a href="#local-encoding">q</a>܂B
<p>
The local encoding used by the application is determined by the locale so there  are no client-encoding entries.
Local encoding is described in the Section <a href="#local-encoding">below</a>.

<dt><a name="server-zld">server-zld</a>
<dd>
ZLD w肵܂BZLD Ƃ <em>Zero Level Domain</em> ̗ŁA<tt>server-encoding</tt>  UTF-5 ȂǓȃGR[fBOw肵ꍇɕKvƂȂ܂BZLD ɂ‚Ă<a href="bindconfig.html">DNST[o̐ݒ</a><a href="bindconfig.html#zld">ZLD ̎w</a>̋LqQlɂȂł傤B
ȂAmDNkit ftHg̐ݒŃRpCꍇɂ ZLD ͎gÃGgw肵Ă܂B
ZLD g悤 mDNkit RpC@ɂ‚Ă<a href="install.html">CXg[</a>hLg<a href="install.html#enable-zld"><tt>--enable-zld</tt></a> ̍B
<dd>
Specifies ZLD. ZLD, which is short for <em>Zero Level Domain</em>, is required when UTF-5 or other special encoding is used in the <tt>server-encoding</tt>. Refer to <a href="bindconfig.html#zld">ZLD Settings</a> in <a href="bindconfig.html">DNS Server Setup</a> for information on ZLD.
Note that when mDNkit is compiled in the default setting that ZLD cannot be used and that this entry will be ignored.
Refer to the Section <a href="install.html#enable-zld"><tt>--enable-zld</tt></a>in the <a href="install.html">Install</a> for instructions on how to compile mDNkit so that ZLD can be used.

<blockquote>
<tt>server-zld </tt><em>ZLD</em>
</blockquote>
<em>ZLD</em> Ŏgp ZLD w肵܂B<p>
<em>ZLD</em> is used to specify ZLD.

<blockquote>
<dl>
<dt>[ݒ]
<dt>[Setting example]
<dd>
<pre>
server-zld zld.to.be.used
</pre>
</dl>
</blockquote>
<p>

<dt><a name="normalize">normalize</a>
<dd>
̃Gg[ł͐K̕@w肵܂B
2 ˆȏ̐K̕@w肳ꂽꍇAԒʂ (E) Kp܂B
<p>
This entry specifies the normalization scheme to be used.
When 2 or more normalization schemes are specified, this will apply in order from left to right.

<blockquote>
<tt>normalize </tt><em>scheme...</em>
</blockquote>
<em>scheme</em> ŐK̖̂̕w肵܂B
<p>
<em>scheme</em> specifies the normalization scheme to be used.

<p>K̕ƂĈȉ̂̂wł܂B
<p>The normalization schemes listed below can be specified.

<blockquote>
<table>
<tr><td><i>ascii-lowercase</i></td>
<td>ASCII ̑啶ɐK<br>
Normalizes upper case ASCII as lower case</td></tr>
<tr><td><i>ascii-uppercase</i></td>
<td>ASCII ̏啶ɐK<br>
Normalizes lower case ASCII as upper case</td></tr>
<tr><td><i>unicode-lowercase</i></td>
<td>Unicode ̑啶ɐK<br>
Normalizes Unicode upper case as lower case</td></tr>
<tr><td><i>unicode-uppercase</i></td>
<td>Unicode ̏啶ɐK<br>
Normalizes Unicode lower case as upper case</td></tr>
<tr><td><i>unicode-form-c</i></td>
<td>Unicode normalization form C</td></tr>
<tr><td><i>unicode-form-kc</i></td>
<td>Unicode normalization form KC</td></tr>
<tr><td><i>ja-kana-fullwidth</i></td>
<td>pJiSpJiɐK<br>
Normalizes half-width kana as full-width kana</td></tr>
<tr><td><i>ja-alnum-halfwidth</i></td>
<td>Sppу}CiXL𔼊pɐK<br>
Normalizes full-width alphanumerics and minus symbol as half-width characters</td></tr><tr><td><i>ja-compose-voiced-sound</i></td>
<td>SpЂ炪ȃJ^JiƂɑ__1ɂ܂Ƃ߂鐳K<br>
Normalizes full-width hiragana, katakana with voicing and aspirating signs as one character.</td></tr>
<tr><td><i>ja-minus-hack</i></td>
<td>Sp}CiXLnCt ('-') ɐK<br>
Normalizes full-width minus symbol as a hyphen ('-').</td></tr>
<tr><td><i>ja-delimiter-hack</i></td>
<td>SpsIhы_𔼊p̃sIh ('.') ɐK<br>
Normalizes full-width periods and punctuation marks as half-width period ('.').</td></tr>
</table>
</blockquote>

<blockquote>
<dl>
<dt>[ݒ]
<dt>[Setting example]
<dd>
<pre>
normalize unicode-lowercase unicode-form-kc 
</pre>
</dl>
</blockquote>

<dt><a name="alternate-encoding">alternate-encoding</a>
<dd>
̃Gg[ł͑փGR[fBǑ`w肵܂B
 փGR[fBOƂ́ADNS vgR̃GR[fBOAvP[Ṽ[JGR[fBOւ̕ϊɎsɁA[JGR[fBȎɎgpGR[fBOłB
ႦΓ{AvP[V DNS T[o؍̃nO܂ރhCԂꂽꍇɂ́A{̃[JGR[fBOɕϊłȂ̂ŁAɂ̑փGR[fBOɕϊꂽʂn܂B
<dd>
This entry determines the alternate encoding format.
 Alternate encoding is used in place of local encoding when a conversion from DNS protocol encoding to the local encoding on the application side fails. 
For example, when a domain name that includes Korean characters is returned from a DNS server to an application that handles Japanese. Since the domain name cannot be converted to Japanese local encoding, it is converted to alternate encoding before the result is passed to the application.

<blockquote>
<tt>alternate-encoding </tt><em>encoding</em>
</blockquote>
<em>encoding</em> ɑփGR[fBÔ̖w肵܂B
Enter the name of the alternate encoding in <em>encoding</em>.

<p>
փGR[fBÓA<a href="../spec/library.html#ACE">ASCII ݊GR[fBO</a>łȂĂ͂Ȃ܂B
<p>
<p>
The alternate encoding must be an <a href="../spec/library.html#ACE">ASCII-compatible encoding</a>.
<p>

<blockquote>
<dl>
<dt>[ݒ]
<dt>[Setting example]
<dd>
<pre>
alternate-encoding RACE
</pre>
</dl>
</blockquote>

<dt><a name="alias-file">alias-file</a>
<dd>
GR[fBÕR[hZbgAʖƂĒlj邱Ƃł܂B
ł́Aljʖ̒`t@Cւ̃pXw肵܂B
<p>
The encoding code set name can be entered as an alias.
Here, we will enter the path name of the alias definition file to be added.

<blockquote>
<tt>alias-file </tt><em>path</em>
</blockquote>
<em>path</em> ɒ`t@C̃pXw肵܂B
Enter the definition file path in <em>path</em>.

<blockquote>
<dl>
<dt>[ݒ]
<dt>[Setting example]
<dd>
<pre>
alias-file /some/where/mdnalias.txt
</pre>
</dl>
</blockquote>

ʖ̒`t@C͒ʏ̃eLXgt@CłA1s1‚•ʖ`܂Beš`͎̒ʂłB
<p>The alias definition file is a normal text file in which one alias is defined on each line. The line format is as follows.
<blockquote>
<pre>
&lt;ʖ&gt;     &lt;̖O&gt;
&lt;alias&gt;     &lt;original name&gt;
</pre>
</blockquote>
GR[fBO &lt;̖O&gt; ̑ &lt;ʖ&gt; g悤ɂȂ܂B
&lt;an alias&gt; can be used instead of the encoding name &lt;original name&gt; 

</dl>

<hr>
<h2><a name="local-encoding">[JGR[fBOɂ‚</a></h2>
<h2><a name="local-encoding">Local Encoding</a></h2>

<p>
[JGR[fBOɂ‚ẮAP[琄Ď肷邽߁ARtBM[Vt@Cł́A[JGR[fBOݒ肷Gg͂܂B
<p>
There is no entry for setting local encoding in the configuration file because it is automatically determined by referencing the locale on the local machine.

<p>
Aȉ̂悤ȃP[X̂Ƃɂ͎肪ł܂B
<p>
However, the following cases cannot be automatically sensed.

<ul>
<li>setlocate ֐gpĂȂAvP[VsƂ
<li>When an application that does not use the setlocate function is executed<li><li>C P[̂܂܃AvP[VsƂ
<li>When an application is executed as a C locale
<li>P[ƃGR[fBȎΉ킩ȂƂ
<li>When the relationship between locale and enconding is not known
</ul>

<p>
̂悤ȏꍇɂ͊‹ϐ <b>MDN_LOCAL_CODESET</b> ݒ肷邱ƂŁA[JGR[fBO̐ݒsƂł܂B
Ⴆ΃[JGR[fBO EUC-JP ɐݒ肷ꍇɂ́A炩ߎ̂悤ȐݒĂ܂B
<p>
Specify the <b>MDN_LOCAL_CODESET</b> environment variable to set local encoding. For example, to set local encoding to EUC-JP, make the following setting beforehand.

<blockquote>
<dl>
<dt>[ݒ]
<dd>
<dl>
<dt>sh n̂Ƃ
<dd>
<pre>
$ MDN_LOCAL_CODESET=EUC-JP
$ export MDN_LOCAL_CODESET
</pre>
<dt>csh n̂Ƃ
<dd>
<pre>
% setenv MDN_LOCAL_CODESET EUC-JP
</pre>
</dl>
</dl>
</blockquote>

<p>w肷l̓[JGR[fBOŁA̓VXe<em>iconv()</em> ֐ (萳mɂ <em>iconv_open()</em>) 󂯕t閼OŎw肵܂B̖O <em>iconv</em> ̎ɂĂꂼقȂ܂̂ŁA̓IȒlɂ‚Ă <em>iconv</em> ̃hLgQƂĂB
<p>The value to be specified is a local encoding name that must be specified using a name that is accepted by the <em>iconv()</em> function in the system (or more precisely <em>iconv_open()</em>). This name differs with the <em>iconv</em> implementation, refer to the <em>iconv</em> document for details.

<p>ȂP̃[JGR[fBOgpĂȂ̂ł΁Â悤Ȑݒ <tt>.profile</tt>  <tt>.cshrc</tt> ɓĂƂ߂܂B
<p>If you only use a single type of local encoding, it is recommended that you save this setting in <tt>.profile</tt> or <tt>.cshrc</tt>.
</body>
</html>