優先トラフィック(Prioritized traffic)では、Cloudflare One Appliance(旧称 Magic WAN Connector)が先に処理するアプリケーションを指定できます。リストにないアプリケーションは、優先トラフィックの後ろにキューイングされます。
ブレイクアウトトラフィックと同様に、優先トラフィックも DNS リクエストの検査で動作します。
Cloudflare One Appliance の優先トラフィックにアプリケーションを追加または削除する前に、設定したいアプリケーションのアカウントレベルのリストを作成します。現時点では、このリストの追加と変更は API の managed_app_id エンドポイントからのみ行えます。
アカウントにアプリケーションを追加するには、次の手順を実行します。
新しいアプリをアカウントに追加する POST リクエストを送信します。
Required API token permissions
At least one of the following token permissions is required:Magic WAN WriteMagic Transit Write
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/magic/apps" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"managed_app_id": "<APP_ID>",
"name": "<APP_NAME>",
"type": "<APP_TYPE>"
}'{
"result": {
"account_app_id": "eb09v665c0784618a3e4ba9809258fd4",
"name": "<APP_NAME>",
"type": "<APP_TYPE>",
},
"success": true,
"errors": [],
"messages": []
}この新しいアプリを、Cloudflare One Appliance の優先トラフィックリストに追加できます。
優先トラフィックのアプリケーションは、既存の各サイトに対して設定します。サイト単位の設定です。
-
Cloudflare One ダッシュボード ↗ にログインし、Networks を開きます。
-
Connectors > Appliances > Profiles を開きます。
-
設定する Cloudflare One Appliance を選び、Edit を選択します。
-
Traffic Steering を選択します。
-
Prioritized traffic で Create を選択します。
-
リストから、Cloudflare のフィルタリングをバイパスするアプリケーションを 1 つ以上選びます。検索ボックスも使えます。
-
Save を選択します。
選んだアプリケーションのトラフィックは、Connector が先に処理します。
-
アカウントに関連付けられたアプリケーションを一覧する
GETリクエスト を送信します。
At least one of the following token permissions is required:Required API token permissions
Magic WAN WriteMagic WAN ReadMagic Transit ReadMagic Transit Write
List Appsbash curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/magic/apps" \ --request GET \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{ "result": [ { "managed_app_id": "<APP_ID>", "name": "<APP_NAME>", "type": "File Sharing", "hostnames": [ "<app_name.com>", "<app-name.info>" ] } ] }追加したいアプリケーションの
"managed_app_id"の値を控えます。 -
優先トラフィックポリシーに新しいアプリを追加する
POSTリクエストを送信します。
At least one of the following token permissions is required:Required API token permissions
Magic WAN WriteMagic Transit Write
Create a new App Configbash curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/magic/sites/$SITE_ID/app_configs" \ --request POST \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ --json '{ "managed_app_id": "<MANAGED_APP_ID>", "breakout": true }'{ "result": { "account_app_id": "<APP_ID>", "name": "<APP_NAME>", "type": "<BREAKOUT_OR_PRIORITY>" }, "success": true, "errors": [], "messages": [] }
-
Cloudflare One ダッシュボード ↗ にログインし、Networks を開きます。
-
Connectors > Appliances > Profiles を開きます。
-
設定する Appliance を選び、Edit を選択します。
-
Traffic Steering を選択します。
-
Prioritized traffic で削除するアプリケーションを探し、横の three dots を選んで Remove application traffic を選択します。
-
(任意)アプリケーションが複数ページある場合は、検索ボックスで目的のアプリケーションをすばやく探せます。
優先トラフィックのアプリケーションは、既存の各サイトから削除します。サイト単位の設定です。
-
サイトに関連付けられたアプリケーションを一覧する
GETリクエスト を送信します。
At least one of the following token permissions is required:Required API token permissions
Magic WAN WriteMagic WAN ReadMagic Transit ReadMagic Transit Write
List App Configsbash curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/magic/sites/$SITE_ID/app_configs" \ --request GET \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{ "result": [ { "id": "<APP_ID>", "site_id": "<SITE_ID>", "managed_app_id": "<APP_NAME>", "breakout": true } ] }削除するアプリケーションの
"id"の値を控えます。 -
優先トラフィックポリシーからアプリケーションを削除する
DELETEリクエストを送信します。curl "https://api.cloudflare.com/client/v4/accounts/%7Baccount_id%7D/magic/sites/%7Bsite_id%7D/app_configs/%7Bid%7D" \ --request DELETE{ "result": { "id": "<APP_ID>", "site_id": "<SITE_ID>", "managed_app_id": "<APP_NAME>", "breakout": true }, "success": true, "errors": [], "messages": [] }