macOS Clash Verge + aTrust network check
When to use
Use this when:
- The user asks whether Clash Verge and aTrust are interfering.
- The user asks for a fresh network-status check on the same Mac.
- You need to tell apart "Clash proxy is broken" from "direct external routing/DNS is broken".
Do not use this when:
- The machine is not the user's macOS environment under the user's home directory.
- The task is general browser/network troubleshooting without Clash Verge, mihomo, aTrust, or EAIO in the picture.
Inputs / context to gather
- Confirm the task is on the user's Mac and involves Clash Verge, mihomo, aTrust, or slow/broken external networking.
- Pick one direct-connect target and one proxied target. Default to
https://www.google.com; if the user is in a China-network context, also testhttps://www.baidu.com. - If the user names a specific node or says "网终情况", plan to inspect Clash
/proxiesstate too.
Procedure
- Check system proxy state first.
- Run
scutil --proxy. - Record whether HTTP/HTTPS/SOCKS point to
127.0.0.1:7890.
- Run
- Check whether both Clash and aTrust stacks are running.
- Run
ps aux | rg -i 'clash|mihomo|verge|atrust|sangfor|eaio'. - Look for
clash-verge,verge-mihomo,aTrust,aTrustXtunnel, andeaio_service.
- Run
- Inspect listeners and route ownership.
- Run
lsof -nP -iTCP:7890 -iTCP:7897 -iTCP:9090 -iTCP:3456. - Run
netstat -rn. - Run
ifconfig. - Look for
utun7or anotherutun*carrying many internal10.*,172.*, or198.18.*routes.
- Run
- Compare direct and proxied traffic against the same external target.
- Direct:
curl -vL --max-time 12 -o /dev/null https://www.google.com - Proxy:
curl -x http://127.0.0.1:7890 -vL --max-time 12 -o /dev/null https://www.google.com - Optional baseline:
curl -v --max-time 8 -o /dev/null https://www.baidu.com
- Direct:
- If Clash itself needs inspection, query mihomo via the unix socket.
- Use
/tmp/verge/verge-mihomo.sock. - Read
/proxiesand inspect the active selector, current global node, delay history, andaliveflags.
- Use
- Report the result in the user's preferred style.
- Lead with whether base networking is up, whether Clash proxy is healthy, and whether the problem is direct external routing.
- Mention aTrust route ownership only if the evidence supports it.
Efficiency plan
- Start with
scutil --proxy, process check, and direct-vs-proxycurl; these three usually answer the main question fastest. - Only read
/proxieswhen you need node-health detail or the user is likely to switch nodes. - Do not spend time on
networksetuporping; they were low-value in this environment. - Stop once you can classify the issue into one of:
- Clash proxy healthy, direct external route broken
- Clash proxy unhealthy
- both look healthy, issue likely elsewhere
Pitfalls and fixes
psreturnsoperation not permitted- Likely cause: the environment blocks low-level process inspection.
- Fix: use the stronger inspection path available in the environment instead of trusting the failure as evidence.
pingreturnsOperation not permitted- Likely cause: sandbox or local environment restriction.
- Fix: skip
ping; usecurland route/proxy inspection.
networksetupreturnsAuthorizationCreate() failed: -60008- Likely cause: this account/environment does not allow that API path.
- Fix: use
scutil --proxy,netstat,lsof, and Clash/proxies.
- Direct Google fails but proxy Google succeeds
- Likely cause: direct external routing/DNS path is bad while Clash is still fine.
- Fix: report it as a route split, not as "Clash died".
Verification checklist
- You checked system proxy state with
scutil --proxy. - You verified whether Clash and aTrust processes are both present.
- You compared direct and proxied access to the same target.
- You checked route/interface state enough to support any claim about aTrust ownership.
- If you mentioned node quality, you actually read
/proxies. - Your conclusion clearly distinguishes proxy health from direct-routing health.