First, confirm the error is for the mixed port
In the client’s core logs, look for a startup error containing listen and bind. If you see listen tcp 127.0.0.1:7890: bind: address already in use, the issue isn’t which node to use—it’s which process is occupying local TCP port 7890. On Windows, the message may instead say Only one usage of each socket address. An open interface or successfully imported subscription doesn’t mean the proxy port is listening.
mixed-portprovides HTTP and SOCKS proxy access through the same local port. 7890 is a common setting, not a port mihomo requires.- The system proxy uses this endpoint. Setting the port to 7891 in your system settings won’t make mihomo listen on 7891.
- If the log reports a failure with the controller interface, DNS listener, or TUN initialization, check the corresponding settings. Changing the mixed port won’t fix these errors, even if they appear during the same startup.
Find the process using the port on Windows, macOS, or Linux
The commands below show what’s listening on TCP port 7890. Note the listening address and process PID, then check the process name and how it was started. Don’t mistake a connection to a remote port 7890 for a local conflict, and don’t check only 127.0.0.1: a process listening on 0.0.0.0:7890 covers all local IPv4 addresses and can also prevent a loopback listener from starting.
Windows 10 / 11:PowerShell
Get-NetTCPConnection -State Listen -LocalPort 7890 |
Select-Object LocalAddress, LocalPort, OwningProcess
If OwningProcess shows 4321, replace the example value below with the actual PID to check the process name and executable path. You can also look up the PID under “Details” in Task Manager. This helps distinguish between separate instances with the same name, such as two mihomo.exe processes.
Get-Process -Id 4321 | Select-Object Id, ProcessName, Path
macOS: Terminal and lsof
lsof -nP -iTCP:7890 -sTCP:LISTEN
Check the COMMAND, PID, and NAME columns. -nP keeps addresses and ports numeric, making it easier to distinguish 127.0.0.1:7890 from *:7890. If the process stays running after you close its window, quit it from the menu bar or app menu instead of launching another client instance.
Linux: ss and ps
ss -ltnp 'sport = :7890'
ps -p 4321 -o pid,ppid,comm,args
ss shows the listening address first; process details appear in the users: field only when you have permission to view them. If you can see the port but not the PID, run sudo ss -ltnp 'sport = :7890' on a system you administer. Replace 4321 in the example with the actual PID, then check its parent process and startup arguments to determine whether it’s a manually launched core or one started by a client or service manager.
The process occupying the port may have exited after startup failed. If the query returns nothing, check again just before and after restarting the client, and compare the timestamps with the same startup log. If the log says
listen udp, check the local UDP endpoint instead; an empty TCP listener list doesn’t rule out a conflict.
Quit duplicate instances or change mixed-port to 7891
| What you found | Recommended action |
|---|---|
| An older Clash client and the new client are running at the same time | Quit the older client normally, then check port 7890 again. Review its startup settings to prevent the port from being claimed again after a reboot. |
| A GUI client and a standalone mihomo service are both running | Keep only the instance that manages traffic on this machine. If you need both, assign them different listening ports. |
| Another app needs to keep using 7890 | Leave that app running and choose an unused port for the current client, such as 7891. |
Don’t force-kill the process as your first step. A service manager may immediately restart the core, causing the port conflict to return. Quitting an older client may also clear the system proxy settings it applied. First exit the old instance, confirm the port is free, then start and configure the client you want to keep.
Change the active configuration, not the subscription cache
First, replace 7890 in the commands above with 7891 and confirm there’s no TCP listener on the new port. If you use a GUI client, look for a setting explicitly labeled “Mixed Port” or Mixed Port. Don’t change the controller port or a standalone SOCKS port by mistake. Menus vary by client, so verify the setting and startup logs.
If you run mihomo directly, edit the YAML file actually read at startup and change the existing top-level mixed-port to the value below. Don’t add a second key with the same name at the end of the file or indent it under dns or tun.
mixed-port: 7891
If a subscription manager controls the configuration, use the client’s supported local override where possible. Editing the downloaded cache directly may be undone the next time the subscription updates. After saving, restart the core from the client or restart the service using its usual management method. Then check the new logs and listening port. If the interface shows 7891 but the logs still show an attempt to bind to 7890, compare the client’s port setting, local overrides, and final startup configuration to find which value is taking effect.
Update the system proxy and app proxy settings
These steps apply when the proxy is for local use only and mihomo is reachable at 127.0.0.1:7891. If the client manages the system proxy, wait until the core is listening, turn “System Proxy” back on, and verify the port in your system settings. Avoid mixing manual and client-managed settings: the client may overwrite your manual values when it exits or reapplies its configuration.
- Windows 11: “Settings” → “Network & internet” → “Proxy” → “Manual proxy setup” → “Edit”. For a manual setup, enter
127.0.0.1as the address and7891as the port. - macOS 13 and later: “System Settings” → “Network” → your current network service (such as Wi-Fi) → “Details” → “Proxies”. If Web Proxy (HTTP) and Secure Web Proxy (HTTPS) are enabled, check both. After switching to Ethernet, check the new active network service.
- Linux (GNOME): “Settings” → “Network” → “Network Proxy”. In Manual mode, check each enabled HTTP, HTTPS, or SOCKS entry. Menus vary across desktop environments, and terminal apps may not use the desktop proxy settings.
If your browser uses an extension or its own proxy settings, or your development tools save a proxy URL, check those for outdated values too. Terminal apps often read proxy settings from http_proxy, https_proxy, or ALL_PROXY. Use http://127.0.0.1:7891 for an HTTP proxy or socks5://127.0.0.1:7891 for a SOCKS5 proxy, updating only the entries you actually use.
TUN receives traffic through a virtual network interface; it doesn’t rely on the system proxy to route connections through the mixed port. Apps using only TUN don’t need an update when you change mixed-port. But if the system proxy is also enabled, or an app explicitly connects to a local proxy, update that route as well. Test one connection method at a time to make it easier to isolate the issue.
Verify the new port and rule matches
- Confirm which process is listening. Run the same command for port 7891 and confirm the listening PID belongs to the mihomo instance you just started—not another process that happened to claim the port first. The logs should no longer show a bind error for that port.
- Test the local proxy directly, bypassing system proxy settings. The command below explicitly sets an HTTP proxy and clears the proxy bypass list for this test. In Windows PowerShell, use
curl.exeinstead ofcurl.
curl -v --max-time 10 --noproxy "" --proxy http://127.0.0.1:7891 https://example.com/
If you get Connection refused immediately, check whether the core is still running and whether its listening address includes 127.0.0.1. If the local connection succeeds but the proxy connection or request times out, check the matching rule, outbound policy, and node logs in the client’s connection history. A local listener doesn’t guarantee a working node, and a successful request doesn’t prove traffic went through a proxy node—the rule may have selected DIRECT.
Finally, make a request from the browser or app you want to use, then check the destination domain and policy in the client’s connection history. If the direct test works but the app still fails, check whether it’s still using port 7890 or taking a different route through a proxy bypass list, extension, or separate proxy setting.
No process is listening, but binding to 7890 still fails
Start by reading the full error. If Windows returns a permissions error such as WSAEACCES or error code 10013 instead of an address-in-use error, check the TCP excluded port ranges. Run the two commands below to inspect IPv4 and IPv6 separately, and see whether 7890 falls within any listed range.
netsh interface ipv4 show excludedportrange protocol=tcp
netsh interface ipv6 show excludedportrange protocol=tcp
Excluded port ranges won’t appear as ordinary listening processes. If 7890 falls within a range, choose an unused port outside it; there’s no need to remove a system reservation. If the log says the specified address can’t be bound, check whether that address still exists on the machine—for example, an old configuration may specify a LAN IP that’s no longer assigned. Changing only the port usually won’t help in that case. Compare the protocol, address, and port in the log with the active configuration to find the cause instead of trying ports at random.