# Clash/Mihomo 节点切换 — for proxychains 602315 bypass setup This file is part of the `LONGBRIDGE_REGION=ap` + proxychains + Clash HK bypass workflow. It documents how to switch the Mihomo proxy's `GLOBAL` selector to a Hong Kong node (a prerequisite for the longbridge 602315 bypass — see `references/longbridge-602315-bypass.md`). **Why this still matters**: even though the bypass uses `LONGBRIDGE_REGION=ap` to force the SDK onto `.com`, the `proxychains4` wrapper still needs a HK exit IP so the `.com` endpoint is reachable. That means the Clash node behind `127.0.0.1:7890` must be on `🇭🇰 [Lv2] 香港 01/02/03`. ## Critical pitfall: selector group PUT may report success but not stick When you PUT to `GLOBAL` / `自动选择` / `故障转移`, the API returns `204` and `now` briefly shows the new node, but on the next probe (a few seconds later) `now` reverts to `None` or to whatever `自动选择` URL-tested. Mihomo's selector-cache race condition makes these top-level groups unreliable for permanent pinning. **Use the raw subscription group name instead** (URL-encode the space): ```bash # Pin to 🇭🇰 香港 01 in BiXin Network (the raw subscription group) curl -X PUT 'http://127.0.0.1:9090/proxies/BiXin%20Network' \ -H 'Content-Type: application/json' \ -d '{"name":"🇭🇰 [Lv2] 香港 01"}' # Verify the pin stuck sleep 2 curl -s 'http://127.0.0.1:9090/proxies/BiXin%20Network' | python3 -c " import json,sys; print('now:', json.load(sys.stdin).get('proxy',{}).get('now')) " # Should print: now: 🇭🇰 [Lv2] 香港 01 ``` ## Confirm HK exit ```bash curl -x http://127.0.0.1:7890 --max-time 10 https://ipinfo.io/json # Expected: "country": "HK", "city": "Hong Kong" or similar # IP usually 154.83.x.x (Cox/Catixs HK block) ``` If exit shows a CN or US IP, the pin didn't stick — re-PUT or check that the BiXin Network selector actually contains the HK node in its `all` list. ## List nodes that include HK ```bash curl -s http://127.0.0.1:9090/proxies | python3 -c " import json,sys d = json.load(sys.stdin) for gn, g in d.get('proxies', {}).items(): if isinstance(g, dict): all_nodes = g.get('all', []) hk = [n for n in all_nodes if '香港' in n or 'HK' in n or '🇭🇰' in n] if hk: print(f'{gn}: {hk[:3]}') " ``` ## Limitations - Clash HTTP proxy does not route Rust SDK HTTPS calls directly — that's what `proxychains4` does for the bypass. Clash alone is not enough for 602315. - Pinning is per-group. If multiple scripts run simultaneously and one of them sets `GLOBAL` directly, the BiXin Network pin survives but global traffic may shift. - If Mihomo config gets reloaded (e.g. `~/.hermes/scripts/update-sub.sh` auto-runs), you may need to re-pin.