優先トラフィック
優先トラフィックを使用すると、Magic WAN Connectorが最初に処理すべきアプリケーションを定義できます。リストにないアプリケーションは、優先トラフィックの後ろにキューされます。
ブレイクアウトトラフィックと同様に、優先トラフィックもDNSリクエストの検査を介して機能します。
優先トラフィックは、各サイトごとの設定であるため、既存の各サイトに対して構成する必要があります。
- Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Sites.
- Select the site you want to configure > Edit.
- Select Traffic Steering.
- In 優先トラフィック, select Add.
- 他のトラフィックよりも優先されるべきアプリケーションを1つ以上選択します。検索ボックスを使用することもできます。
- アプリケーションを追加を選択します。
選択したアプリケーションのトラフィックは、Connectorによって最初に処理されます。
-
GETリクエストを送信して、アカウントに関連付けられたアプリケーションのリストを取得します。例:
Terminal window curl https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/apps \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"{"result": [{"managed_app_id": "<MANAGED_APP_ID>","name": "<APP_NAME>","type": "<TYPE_OF_APP>","hostnames": ["<HOSTNAME1.com>", "<HOSTNAME2.info>"]}],"success": true,"errors": [],"messages": []}構成したいアプリケーションの
"managed_app_id"の値に注意してください。 -
POSTリクエストを送信して、優先トラフィックポリシーに新しいアプリを追加します。例:
Terminal window curl https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/sites/{site_id}/app_configs \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>" \--header "Content-Type: application/json" \--data '{"managed_app_id": "<MANAGED_APP_ID>","priority": 1}'{"result": {"id": "023e105f4ecef8ad9ca31a8372d0c353","site_id": "023e105f4ecef8ad9ca31a8372d0c353","managed_app_id": "<MANAGED_APP_ID>","breakout": true},"success": true,"errors": [],"messages": []}
- Log in to the Cloudflare dashboard ↗, and select your account.
- Select Magic WAN > Sites.
- Select the site you want to configure > Edit.
- Select Traffic Steering.
- In 優先トラフィック, find the application you want to delete, and select the three dots next to it.
- Select Remove.
- (Optional) If you have several pages of applications, you can use the search box to quickly find the application you are looking for.
-
GETリクエストを送信して、サイトに関連付けられたアプリケーションのリストを取得します。例:
Terminal window curl https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/sites/{site_id}/app_configs \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"{"result": [{"id": "023e105f4ecef8ad9ca31a8372d0c353","site_id": "023e105f4ecef8ad9ca31a8372d0c353","managed_app_id": "<MANAGED_APP_ID>","breakout": true}],"success": true,"errors": [],"messages": []}削除したいアプリケーションの
"id"の値に注意してください。 -
DELETEリクエストをAPIを使用して送信し、ブレイクアウトトラフィックポリシーからアプリケーションを削除します。Terminal window curl --request DELETE \https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/sites/{site_id}/app_configs/{id} \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"{"result": {"id": "023e105f4ecef8ad9ca31a8372d0c353","site_id": "023e105f4ecef8ad9ca31a8372d0c353","managed_app_id": "<MANAGED_APP_ID>","breakout": true},"success": true,"errors": [],"messages": []}