mDNkit 仕様書
mDNkit Specifications
mDNkit は次のようなコンポーネントから構成されます。
The mDNkit is comprised of the following components.
- dnsproxy
DNS サーバのプロキシサーバとして動作し、クライアントからの DNS
メッセージを DNS サーバに中継し、また DNS サーバから返される
DNS メッセージをクライアントに中継します。
Operating as a proxy server for the DNS server, this command relays DNS messages from the client to the DNS server and relays DNS messages returned from the DNS server to the client.
クライアントから送られてきた DNS メッセージを中継する際には、
メッセージ中のドメイン名を、クライアントの使用する
ローカルエンコーディングから、多言語化された DNS サーバの使用する
DNS プロトコル上のエンコーディングに変換するとともに
正規化や ZLD の除去・付加を行います。
When DNS messages sent from the client are relayed, the domain name in the message is converted from the local encoding used by the client to the DNS protocol encoding used by the multilingualized DNS server and normalization or deletion/addition of ZLD is also performed.
また DNS サーバから返された DNS メッセージを中継する際には、
メッセージ中のドメイン名を、DNS プロトコル上のエンコーディングから
ローカルエンコーディングに変換し、同時に ZLD の除去・付加を行います。
In addition, when a DNS message returned from the DNS server is relayed, the domain name in the message is converted from the DNS protocol encoding to the local encoding, and at the same time ZLD is deleted/added.
- mdnconv
ゾーンマスタファイルや named.conf ファイルのエンコーディング
変換用ツールです。ローカルエンコーディングで記述されたこれらのファイルを、
多言語化された DNS サーバが使用するDNS プロトコル上のエンコーディングに
変換し、同時に正規化も行います。
This is an encoding conversion tool for zone master files or named.conf files. These locally-encoded files are converted to the DNS protocol encoding used by the multilingualized DNS server, and normalization is performed at the same time.
- BIND-9 パッチ
- BIND-9 Patch
BIND-9 で多言語ドメイン名を扱えるようにするためのパッチです。
このパッチを適用することにより、BIND-9 のリゾルバに多言語ドメイン名の
エンコーディング変換や正規化の機能が付加されます。これにより
dnsproxy を使用することなく、多言語ドメイン名が扱えるようになります。
また dig 等のツールでも多言語ドメイン名を扱えるようになります。
This patch adds to BIND-9 the ability to support multilingual domain names.
This patch adds encoding conversion of multilingual domain names and normalization functions to the BIND-9 resolver. Because of this, multilingual domain names will be supported without using dnsproxy.
Also, tools such as dig will be able to support multgilingual domain names.
- runmdn
BIND-4 あるいは BIND-8 ベースのアプリケーションを再コンパイルすることなしに
多言語ドメイン名を扱えるようにするためのコマンドです。
アプリケーションの実行時に MDN ライブラリを動的にリンクすることにより
アプリケーションにリンクされているリゾルバに多言語ドメイン名の
エンコーディング変換や正規化の機能が付加されます。これにより
dnsproxy を使用することなく、多言語ドメイン名が扱えるようになります。
This command allows support of multilingual domain names in BIND-4 or BIND-8 based applications, without re-compiling.
By dynamically linking the MDN library when the application is executed, encoding conversion of multilingual domain names and normalization functions are added to the resolver linked to the application. Because of this, multilingual domain names can be handled without using dnsproxy.
- mDN Wrapper
Windows ベースのアプリケーションで多言語ドメイン名を扱えるようにするための、
WINSOCK に対するWrapper DLL です。
通常、WindowsアプリケーションはWINSOCK によってドメイン名を解決します。
mDN Wrapper は、WINSOCK の呼び出しをフックして、
多言語ドメイン名のエンコーディングの変換や正規化を行ないます。
同じようなことはdnsproxyでもできますが、
mDN Wrapper を使った場合には、
アプリケーション毎に異なったローカルエンコーディングを受付けることもできます。
This is a Wrapper DLL for WINSOCK that allows Windows-based applications to support multilingual domain names.
Usually, Windows applications resolve domain names with WINSOCK.
mDN Wrapper intercepts the WINSOCK call and performs encoding conversion and normalization of multilingual domain names.
The same thing can be done with dnsproxy; however, when mDN Wrapper is used different local encoding used by applications can be accepted.
- MDN ライブラリ
- MDN library
上記のコンポーネントが使用するライブラリです。多言語ドメイン名の変換に
関わる
This library is used by the above components, and provides the following multilingual domain name-related functions.
- エンコーディング変換
- Encoding conversion
- 文字列の正規化
- Normalization of text string
- DNS メッセージの解析と組み立て
- Analysis and assembly of DNS messages
- ZLD の削除、追加
- Deletion and addition of ZLD
という機能を提供します。
- 8ビットスルーパッチ
- 8-bit through patch
dnsproxy を用いて多言語ドメイン名のエンコーディング変換や正規化等を
行う場合、DNS サーバやリゾルバライブラリにはこれらの機能は必要ありません。
ただし DNS プロトコル上のエンコーディングとして
UTF-8 等の 8 ビットコードを使用する場合、
従来の DNS サーバは使用することができず、8ビットコードをエラーにせずに
通すような改造が必要です。
When dnsproxy is used to convert multilingual domain name encoding or perform normalization, these functions are not required in the DNS server or resolver library.
However, when 8-bit code such as UTF-8 is used for DNS protocol encoding, the conventional DNS server cannot be used and modification must be performed so that 8-bit code can be passed without error.
またローカルエンコーディングが SJIS 等の 8 ビットコードを使用する場合、
やはりリゾルバライブラリにも 8 ビットコードをそのまま通し、
エラーにしないようにするための改造が必要です。
When the local encoding uses 8-bit code such as SJIS, the resolver library also must be modified so that 8-bit code can be passed without error.
さらにアプリケーションの中には、独自にドメイン名の検査を行い、
8 ビットコードを通さないものがあります。
Furthermore, some applications check domain names themselves and do not pass 8-bit code.
このため、本キットでは
For this reason, this kit provides the following patches:
- BIND-8 のネームサーバ、リゾルバを 8 ビットスルーにするためのパッチ
- Patch that makes the BIND-8 name server and resolver 8-bit through
- Web のキャッシュサーバである Squid の URL 解析部分を 8 ビットスルー
にするためのパッチ
- Patch that makes the URL analysis part of Squid 8-bit through (Squid is a Web cache server)
を提供します。
これらの 8 ビットスルーパッチに関しては特に仕様の記述は行いません。
The specifications of these 8-bit through patches are not discussed here.
各コンポーネントがどこでどのように使われるのかを示したのが次の2枚の図です。
The following two diagrams illustrate how and where each component is used.
1枚目は多言語ドメイン名の処理を dnsproxy を利用して行う場合の構成図です。
The first diagram depicts multilingual domain name processing using dnsproxy.
2枚目は dnsproxy を使用せず、クライアント側のリゾルバで多言語ドメイン名の
処理を行う場合の構成図です。
The second diagram depicts multilingual domain name processing using the client side resolver without using dnsproxy.
図中、イタリック体の部分が本キットに含まれるコンポーネントです。
In the diagrams, the italicized parts are compoments included in the kit.
図の上半分は SJIS など、ローカルエンコーディングが使用される
世界で、下半分が UTF-8 など、多言語化された DNS が使用する
DNS プロトコル上のエンコーディングが使用される世界です。
本キットが提供するコンポーネントはこれらの世界をつなぐためのものです。
Local encoding such as SJIS is used in the upper half of the diagram, and multilingual DNS protocal encoding such as UTF-8 is used in the lower half of the diagram.
The components provided by this kit serve as a bridge between these two worlds.