「Cloudflared」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(英語版から転載)
 
(同期)
 
(3人の利用者による、間の7版が非表示)
1行目: 1行目:
[[Category:Domain Name System]]
+
[[Category:ドメインネームシステム]]
  +
[[en:Cloudflared]]
[https://developers.cloudflare.com/1.1.1.1/dns-over-https/cloudflared-proxy/ Cloudflared] may be used to run a local [[DNS over HTTPS]] server (DoH), i.e., a stub resolver.
 
  +
[https://developers.cloudflare.com/1.1.1.1/dns-over-https/cloudflared-proxy/ Cloudflared] は、[[DNS over HTTPS]] サーバー(DOH)、つまりスタブリゾルバーを介してローカル DNS を実行するために使用できます。
   
== Installation ==
+
== インストール ==
   
[[Install]] the {{AUR|cloudflared}} or {{AUR|cloudflared-bin}} package.
+
{{pkg|cloudflared}} または {{AUR|cloudflared-bin}} パッケージを [[インストール]] してください。
   
== Configuration ==
+
== 使い方 ==
   
  +
{{ic|cloudflared proxy-dns}} を実行して、https プロキシサーバーを介して DNS を実行します。
Create the following file, replacing {{ic|<endpoint>}} with preferred endpoints:
 
  +
{{hc|/etc/cloudflared/config.yml|
 
  +
{{ic|--address}} オプションと {{ic|--port}} オプションを使用して、Cloudflared が待ち受けするアドレスとポートを指定できます。デフォルトでは、それぞれ localhost および 53 に設定されています。利用可能なコマンドラインオプションの一覧については、[https://fig.io/manual/cloudflared/proxy-dns こちら] をご覧ください。
proxy-dns: true
 
  +
proxy-dns-upstream:
 
  +
systemd の [[systemd#ユニットファイル|サービスファイル]] を作成できます。
''' - <endpoint>'''
 
  +
''' - <endpoint>'''
 
  +
{{hc|/etc/systemd/system/cloudflared.service|2=
''' - <endpoint>'''
 
  +
[Unit]
proxy-dns-port: 53
 
  +
Description=DNS over HTTPS proxy client
proxy-dns-address: 0.0.0.0
 
  +
Wants=network-online.target nss-lookup.target
  +
Before=nss-lookup.target
  +
  +
[Service]
  +
AmbientCapabilities=CAP_NET_BIND_SERVICE
  +
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
  +
DynamicUser=yes
  +
ExecStart=/usr/bin/cloudflared proxy-dns --port 5300
  +
  +
[Install]
  +
WantedBy=multi-user.target
 
}}
 
}}
   
  +
{{Note|追加のパッケージはサービスファイルを提供しません。{{bug|75999}} を参照してください。}}
As per [https://developers.cloudflare.com/1.1.1.1/1.1.1.1-for-families/setup-instructions/dns-over-https/ upstream documentation], here are the available endpoints:
 
  +
  +
サービスを起動した後、{{Pkg|ldns}} パッケージが提供する {{man|1|drill}} コマンドを使用して動作をテストできます。
  +
  +
$ drill archlinux.org @127.0.0.1 -p 5300
  +
  +
== チェック ==
  +
  +
[https://1.1.1.1/help 1.1.1.1/help] を使用して、ブラウザーが ''CloudFlare Doh'' を使用しているかどうかを確認します。
  +
  +
== エンドポイント ==
  +
  +
デフォルトでは、Cloudflared は Cloudflare の DNS サーバー (IPv4 アドレス:1.1.1.1 および 1.0.0.1) を上流エンドポイント URL として使用します。
  +
  +
異なる上流エンドポイント URL を指定する場合は、--upstream オプションを使用できます。
  +
  +
上流ドキュメントによると、利用可能なエンドポイントは次のとおりです:
  +
  +
{{Tip|[[cURL]] のドキュメントで、代替の公開された [https://github.com/curl/curl/wiki/DNS-over-HTTPS endpoints] のリストが維持されています}}
   
{{Tip|[[cURL]]'s documentation maintains a list of alternative public [https://github.com/curl/curl/wiki/DNS-over-HTTPS endpoints].}}
 
 
{| class="wikitable sortable" style="text-align: center;"
 
{| class="wikitable sortable" style="text-align: center;"
! class="unsortable" | Endpoints
+
! class="unsortable" | エンドポイント
! class="unsortable" | Description
+
! class="unsortable" | 説明
 
|-
 
|-
 
| style="text-align:left;" | {{bc|<nowiki>
 
| style="text-align:left;" | {{bc|<nowiki>
31行目: 60行目:
 
- https://2606:4700:4700::1111/dns-query
 
- https://2606:4700:4700::1111/dns-query
 
- https://2606:4700:4700::1001/dns-query
 
- https://2606:4700:4700::1001/dns-query
</nowiki>}} || Standard
+
</nowiki>}} || 標準
 
|-
 
|-
 
| style="text-align:left;" | {{bc|<nowiki>
 
| style="text-align:left;" | {{bc|<nowiki>
 
- https://security.cloudflare-dns.com/dns-query
 
- https://security.cloudflare-dns.com/dns-query
</nowiki>}} || Standard, but blocks malware
+
</nowiki>}} || 標準、マルウェアをブロック
 
|-
 
|-
 
| style="text-align:left;" | {{bc|<nowiki>
 
| style="text-align:left;" | {{bc|<nowiki>
 
- https://family.cloudflare-dns.com/dns-query
 
- https://family.cloudflare-dns.com/dns-query
  +
</nowiki>}} || 標準、マルウェアやアダルトコンテンツをブロック
</nowiki>}} || Standard, but blocks malware and porn
 
 
|-
 
|-
 
| style="text-align:left;" | {{bc|<nowiki>
 
| style="text-align:left;" | {{bc|<nowiki>
46行目: 75行目:
 
|}
 
|}
   
== Usage ==
+
== 参照 ==
 
[[Start]] and [[enable]] {{ic|cloudflared@cloudflared.service}}. Now you can use your device's IP address as a DNS server.
 
 
{{Tip|Use [https://1.1.1.1/help 1.1.1.1/help] to check if browser is using ''Cloudflare DoH''.}}
 
 
== See also ==
 
   
  +
* [https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/dns-over-https-client/ Official guide]
  +
* [https://fig.io/manual/cloudflared/proxy-dns Command line options]
 
* [https://developers.cloudflare.com/1.1.1.1/dns-over-https/cloudflared-proxy/ Running a DNS over HTTPS Client - Cloudflare Resolver]
 
* [https://developers.cloudflare.com/1.1.1.1/dns-over-https/cloudflared-proxy/ Running a DNS over HTTPS Client - Cloudflare Resolver]
 
* [https://blog.cloudflare.com/introducing-1-1-1-1-for-families/ Introducing 1.1.1.1 for families]
 
* [https://blog.cloudflare.com/introducing-1-1-1-1-for-families/ Introducing 1.1.1.1 for families]

2025年2月2日 (日) 18:48時点における最新版

Cloudflared は、DNS over HTTPS サーバー(DOH)、つまりスタブリゾルバーを介してローカル DNS を実行するために使用できます。

インストール

cloudflared または cloudflared-binAUR パッケージを インストール してください。

使い方

cloudflared proxy-dns を実行して、https プロキシサーバーを介して DNS を実行します。

--address オプションと --port オプションを使用して、Cloudflared が待ち受けするアドレスとポートを指定できます。デフォルトでは、それぞれ localhost および 53 に設定されています。利用可能なコマンドラインオプションの一覧については、こちら をご覧ください。

systemd の サービスファイル を作成できます。

/etc/systemd/system/cloudflared.service
[Unit]
Description=DNS over HTTPS proxy client
Wants=network-online.target nss-lookup.target
Before=nss-lookup.target

[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
DynamicUser=yes
ExecStart=/usr/bin/cloudflared proxy-dns --port 5300

[Install]
WantedBy=multi-user.target
ノート: 追加のパッケージはサービスファイルを提供しません。FS#75999 を参照してください。

サービスを起動した後、ldns パッケージが提供する drill(1) コマンドを使用して動作をテストできます。

$ drill archlinux.org @127.0.0.1 -p 5300

チェック

1.1.1.1/help を使用して、ブラウザーが CloudFlare Doh を使用しているかどうかを確認します。

エンドポイント

デフォルトでは、Cloudflared は Cloudflare の DNS サーバー (IPv4 アドレス:1.1.1.1 および 1.0.0.1) を上流エンドポイント URL として使用します。

異なる上流エンドポイント URL を指定する場合は、--upstream オプションを使用できます。

上流ドキュメントによると、利用可能なエンドポイントは次のとおりです:

ヒント: cURL のドキュメントで、代替の公開された endpoints のリストが維持されています
エンドポイント 説明
 - https://1.0.0.1/dns-query
 - https://1.1.1.1/dns-query
 - https://2606:4700:4700::1111/dns-query
 - https://2606:4700:4700::1001/dns-query
標準
 - https://security.cloudflare-dns.com/dns-query
標準、マルウェアをブロック
 - https://family.cloudflare-dns.com/dns-query
標準、マルウェアやアダルトコンテンツをブロック
 - https://9.9.9.9/dns-query
Quad9

参照