Are you an LLM? You can read better optimized documentation at /en\tutorial\external-controller.md for this page in Markdown format
External Controller
Overview
The external controller exposes an HTTP API for inspecting and changing Clash state. A local dashboard uses this API to display logs, traffic, proxies and connections.
yaml
external-controller: 127.0.0.1:9090
secret: "choose-a-long-secret"Authentication
Send Authorization: Bearer <secret> with requests when a secret is configured. Always set a strong secret if the controller listens beyond 127.0.0.1. Do not expose it to the public internet.
API areas
The API includes endpoints for logs, traffic, version, configuration, proxies, rules, connections, proxy providers and DNS queries. For exact paths and request bodies, see the RESTful API reference and the upstream API documentation.
