ens

原始碼 首頁

啟用方式
ens:github.com/wealdtech/coredns-ens

ens - 從以太坊域名服務提供 DNS 紀錄。

描述

ens 外掛程式從以太坊域名服務提供 DNS 紀錄。以太坊為相關網域提供了 DNS 紀錄的權威來源,允許任何名稱伺服器提供權威數據,而無需對 DNS 紀錄本身具有寫入權限。

建議將此外掛程式放在 plugins.cfg 檔案中的 rewrite 之後。

語法

ens {
  # connection is the connection to an Ethereum node.  It is *highly*
  # recommended that a local node is used, as remote connections can
  # cause DNS requests to time out.
  # This can be either a path to an IPC socket or a URL to a JSON-RPC
  # endpoint.
  connection CONNECTION

  # ethlinknameservers are the names of the nameservers that serve
  # EthLink domains.  This will usually be the name of this server,
  # plus potentially one or more others.
  ethlinknameservers SERVER...

  # ipfsgatewaya is the address of an ENS-enabled IPFS gateway.
  # This value is returned when a request for an A record of an Ethlink
  # domain is received and the domain has a contenthash record in ENS but
  # no A record.  Multiple values can be supplied, separated by a space,
  # in which case all records will be returned.
  ipfsgatewaya ADDRESS...

  # ipfsgatewayaaaa is the address of an ENS-enabled IPFS gateway.
  # This value is returned when a request for an AAAA record of an Ethlink
  # domain is received and the domain has a contenthash record in ENS but
  # no A record.  Multiple values can be supplied, separated by a space,
  # in which case all records will be returned.
  ipfsgatewayaaaa ADDRESS...
}

範例

ens {
  connection /home/ethereum/.ethereum/geth.ipc
  ethlinknameservers ns1.ethdns.xyz ns2.ethdns.xyz
  ipfsgatewaya 176.9.154.81
  ipfsgatewayaaaa 2a01:4f8:160:4069::2
}