「Cloudflared」の版間の差分
ナビゲーションに移動
検索に移動
細 ({{AUR|cloudflared}}がリンク切れだったため、 {{pkg|cloudflared}} に変更) |
(同期) |
||
| (2人の利用者による、間の4版が非表示) | |||
| 1行目: | 1行目: | ||
| − | [[Category: |
+ | [[Category:ドメインネームシステム]] |
[[en:Cloudflared]] |
[[en:Cloudflared]] |
||
| − | [https://developers.cloudflare.com/1.1.1.1/dns-over-https/cloudflared-proxy/ Cloudflared] は、 |
+ | [https://developers.cloudflare.com/1.1.1.1/dns-over-https/cloudflared-proxy/ Cloudflared] は、[[DNS over HTTPS]] サーバー(DOH)、つまりスタブリゾルバーを介してローカル DNS を実行するために使用できます。 |
== インストール == |
== インストール == |
||
| 7行目: | 7行目: | ||
{{pkg|cloudflared}} または {{AUR|cloudflared-bin}} パッケージを [[インストール]] してください。 |
{{pkg|cloudflared}} または {{AUR|cloudflared-bin}} パッケージを [[インストール]] してください。 |
||
| − | == |
+ | == 使い方 == |
| + | |||
| + | {{ic|cloudflared proxy-dns}} を実行して、https プロキシサーバーを介して DNS を実行します。 |
||
| + | |||
| + | {{ic|--address}} オプションと {{ic|--port}} オプションを使用して、Cloudflared が待ち受けするアドレスとポートを指定できます。デフォルトでは、それぞれ localhost および 53 に設定されています。利用可能なコマンドラインオプションの一覧については、[https://fig.io/manual/cloudflared/proxy-dns こちら] をご覧ください。 |
||
| + | |||
| + | systemd の [[systemd#ユニットファイル|サービスファイル]] を作成できます。 |
||
| + | |||
| + | {{hc|/etc/systemd/system/cloudflared.service|2= |
||
| + | [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] |
||
| − | 以下のファイルを作成し、{{ic|<endpoint>}} を優先するエンドポイントに置き換えます。 |
||
| + | WantedBy=multi-user.target |
||
| − | {{hc|/etc/cloudflared/config.yml| |
||
| − | proxy-dns: true |
||
| − | proxy-dns-upstream: |
||
| − | ''' - <endpoint>''' |
||
| − | ''' - <endpoint>''' |
||
| − | ''' - <endpoint>''' |
||
| − | proxy-dns-port: 53 |
||
| − | proxy-dns-address: 0.0.0.0 |
||
}} |
}} |
||
| + | {{Note|追加のパッケージはサービスファイルを提供しません。{{bug|75999}} を参照してください。}} |
||
| − | [https://developers.cloudflare.com/1.1.1.1/1.1.1.1-for-families/setup-instructions/dns-over-https/ upstream documentation], にあるように、利用可能なエンドポイントは以下の通りです: |
||
| + | |||
| + | サービスを起動した後、{{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]] のドキュメントで、代替の公開された [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" | エンドポイント |
! class="unsortable" | エンドポイント |
||
| 40行目: | 68行目: | ||
| 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>}} || 標準、マルウェアやアダルトコンテンツをブロック |
|- |
|- |
||
| style="text-align:left;" | {{bc|<nowiki> |
| style="text-align:left;" | {{bc|<nowiki> |
||
| 46行目: | 74行目: | ||
</nowiki>}} || Quad9 |
</nowiki>}} || Quad9 |
||
|} |
|} |
||
| − | |||
| − | == 使い方 == |
||
| − | |||
| − | {{ic|cloudflared@cloudflared.service}} を [[systemd#ユニットを使う|スタート]] して[[有効化]] します。これで、端末の IP アドレスを DNS サーバーとして使用できるようになります。 |
||
| − | |||
| − | {{Tip|ブラウザが ''Cloudflare DoH'' を使用しているかどうかを確認するには [https://1.1.1.1/help 1.1.1.1/help] を使用します。}} |
||
== 参照 == |
== 参照 == |
||
| + | * [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
サービスを起動した後、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 オプションを使用できます。
上流ドキュメントによると、利用可能なエンドポイントは次のとおりです:
| エンドポイント | 説明 |
|---|---|
- 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 |