Two ports, two different jobs
A Clash-family core opens at least two kinds of listener, and confusing them makes this error unreadable.
| Listener | Default | Who uses it |
|---|---|---|
| Mixed proxy | 7890 | Applications that want to send traffic through the proxy |
| External controller | 9090 | The GUI, and any script that switches nodes or reads traffic counters |
The controller is a REST API. The interface calls it to list proxies, change the selected node, read upload and download totals, and stream the connection log. If that listener fails to bind, the interface has no channel — but the proxy listener is a separate socket and may be perfectly healthy.
So the symptom is not "the proxy stopped". It is "the proxy kept working and the interface went blind". Users notice it as a frozen traffic graph, a node list that will not switch, or an app that reports the core as disconnected while pages still load.
Confirm the split before fixing anything
Two checks, thirty seconds, and they tell you which listener is actually broken.
- Send a request through the proxy port with the port named explicitly. If it returns content, the proxy listener is alive.
- Request the controller endpoint on 9090. If nothing answers, the controller is not bound — and that, not the proxy, is your failure.
Getting the second check to mean something requires the controller's secret, because the API rejects unauthenticated calls. A request without the token returning 401 is actually good news: it proves the listener is alive. A connection refused is the failure you are looking for. Do not read a 401 as a broken controller.
Why 9090 collides so often
9090 is not an unusual number, and Clash-derived clients all default to it. The realistic holders are:
- A previous core that never exited. Service mode keeps the core alive after the window closes, by design. Start the interface again and its own old core holds the controller port.
- Another Clash client. A second fork, a portable copy, or a different GUI wrapping the same engine.
- An unrelated service. 9090 appears in monitoring stacks and in a few web panels, so a server or a dev environment on the same machine can own it.
- A script or dashboard you set up earlier. Anything that polled the API and was given a fixed port.
The PID check is the same as for any port, and the process name is more informative here than usual: if it is a core binary, you have a leftover instance, not a foreign application.
What to change, and what depends on it
Changing the controller port is safer than changing the proxy port, because fewer things point at it. But not zero things.
- The interface's own setting must match, or it will keep calling the old port.
- Any external dashboard or script that read traffic statistics has the old value hardcoded somewhere.
- The profile can carry
external-controllerand override the interface, exactly as it can override the proxy port.
Set both the interface value and the profile value, reload, then confirm the interface shows live traffic again. Live counters are the proof: they cannot come from a cached value, so a moving graph means the channel is restored.
One caution about exposure. The controller can switch nodes and read connection metadata, and its default bind is loopback for that reason. Do not move it to all interfaces to solve a conflict — that publishes an unauthenticated-until-you-set-it control API to the network. If a remote dashboard needs it, the correct shape is a tunnel or a reverse proxy with its own authentication, not a wider bind.
When the controller binds but the interface still shows nothing
Three causes remain, and they are all authentication or address rather than binding.
- Secret mismatch. The API requires a bearer token; if the interface sends the wrong one it gets 401 and shows a disconnected state. The secret is in the profile and in the interface, and the two must agree.
- Wrong host. A controller bound to
127.0.0.1is not reachable atlocalhoston systems where that name resolves to IPv6 first. The interface may try one and fail while the other works. - Mixed mode. In service mode the core runs under a different account and a different network namespace in some configurations, so a loopback bind is not reachable from the interface's side. This is the case where the controller is genuinely alive and genuinely unreachable.
Distinguishing them takes one request from the same context the interface runs in. If that request succeeds and the interface still fails, the problem is the interface's credentials or host resolution, not the core.
Frequently asked
Can I keep browsing while the controller port is broken?
Yes, if the proxy listener is bound and applications already point at it. Traffic forwarding does not depend on the controller. What stops working is node switching, the traffic graph, the connection list, and any rule changes that require a reload.
Does 401 mean the controller is down?
No, the opposite. A 401 response proves something is listening and rejecting you for lack of credentials. Connection refused is the down case. Reading a 401 as a failure sends you to fix a healthy listener.
Why does it break after I close the window?
In service mode the core outlives the window. Reopening the interface starts a second core that cannot bind the controller because the first still holds it. End the core process or stop the service, then start once.
Is it safe to expose 9090 to my LAN?
Not without additional protection. The API can change the selected node and read connection metadata, and its default loopback bind exists precisely to keep it local. Use a tunnel or an authenticating reverse proxy if a remote dashboard needs access.
The interface shows zero traffic but pages load fine. Which port is broken?
The controller. Traffic counters come from the API, so a live proxy with a dead API shows zero. Confirm by requesting the API directly; if it refuses the connection, that is your answer.