flclash.st
English
简体中文繁體中文EnglishРусскийفارسی

HomeRecipesExternal controller

External controller

FlClash can turn on the external controller so web dashboards or other devices can view connections and switch nodes through a REST interface. Setting the port and secret, listening on this machine only versus the local network, and security notes.

Ingredients

  • The "External controller" switch in FlClash's settings
  • A secret of your own (the longer the better)
  • A web dashboard that speaks the Clash API, such as metacubexd or zashboard

What it does

The external controller is an HTTP interface provided by the mihomo core, usually on port 9090. Once on, a web dashboard can connect to it to show live connections and traffic graphs, switch nodes and test delays. FlClash's own interface is already complete, so the external controller is mainly for:

  • watching this computer's FlClash from another computer;
  • using a web dashboard you prefer;
  • scripts that switch nodes automatically.
A mixing desk: the external controller brings the knobs outside so others can turn them
A mixing desk: the external controller brings the knobs outside so others can turn them Rodrigo César, Public domain

Steps

  1. FlClash settings → turn on the external controller; keep port 9090 or choose a free one.
  2. Set a secret. Without one, anyone who can reach it controls your proxy.
  3. Open the web dashboard, enter http://127.0.0.1:9090 as the backend and the secret you set.
Confirm the interface answers from the command line
curl -H "Authorization: Bearer your-secret" http://127.0.0.1:9090/version

A version number in reply means the interface works.

This machine only, or the local network

Listening onWho can connectRisk
127.0.0.1Only this computerLow
0.0.0.0 or a LAN IPEvery device on the same networkOn public Wi-Fi others can find it too
The web dashboard says the connection failed?

Usually the secret is wrong, or another program holds the port. Check with the workshop's port check.

Does the external controller slow FlClash down?

No; the interface only works when something calls it.

Read onMerging subscriptions

Read alongside

This page covers: FlClash external controller, Clash port 9090, metacubexd dashboard