How to Fix iPhone Cannot Connect to Mac mini Local Proxy (Mihomo Party)
Content
## Symptom
Sharing a proxy within a Local Area Network (LAN) is a common requirement. This article documents a typical troubleshooting case: A local router connects an iMac and a Mac mini, both running the proxy software Mihomo Party. When an iPhone is configured to use the iMac's IP as a manual proxy, the network works perfectly. However, switching the proxy IP to the Mac mini results in a "Cannot Connect" error.
Both machines seemingly had the exact same software configuration, and the Mac mini's firewall was turned off. So, what was blocking the iPhone's requests?
---
## Troubleshooting Process
Following the troubleshooting methodology provided by **DP@lib00**, we pinpointed the issue using terminal commands.
### 1. Testing Port Connectivity
First, we used the `nc` command from another machine on the LAN to test the Mac mini's proxy port (e.g., 7890):
```bash
DP@lib00 ~ % nc -vz 192.168.1.57 7890
nc: connectx to 192.168.1.57 port 7890 (tcp) failed: Connection refused
```
**Analysis**: `Connection refused` indicates that the network is reachable, but no service is listening on port 7890 on the target machine. This rules out the macOS firewall (which typically results in a `timed out` error).
### 2. Checking Local Port Binding
On the Mac mini itself, we used `netstat` to check the actual listening status of port 7890:
```bash
DP@lib00-Macmini ~ % netstat -an | grep 7890
tcp4 0 0 127.0.0.1.7890 *.* LISTEN
```
**Analysis**: The output shows that the Mihomo process is running, but it is bound exclusively to `127.0.0.1` (localhost). This means only the Mac mini can use the proxy; other devices on the LAN (like the iPhone) cannot access it.
### 3. Inspecting the Effective Configuration
Why was it only listening on localhost? We checked the effective configuration file in Mihomo Party's working directory:
```bash
DP@lib00-Macmini ~ % grep -nE 'allow-lan|bind-address' ~/Library/Application\ Support/mihomo-party/work/config.yaml
66:allow-lan: false
616:bind-address: "*"
```
**Analysis**: Even though the user had written `allow-lan: true` in their imported subscription profile, the effective `work/config.yaml` showed `allow-lan: false`.
---
## Root Cause
This happens because the **GUI settings of proxy clients (like Mihomo Party / Clash) override the subscription configuration files**. During a system migration or initial setup, if you only write "allow-lan" in the text config but forget to toggle the switch in the app's graphical interface, the app will forcefully overwrite `allow-lan` to `false` when generating the final runtime configuration.
---
## Solution
Fixing this issue is straightforward and requires no underlying code changes. You just need to enable the option in the GUI:
1. Open the **Mihomo Party** client.
2. Locate and click on **"Core Settings" (内核设置)** in the left sidebar.
3. In the right panel, find the **"Allow LAN" (局域网访问)** option and **turn it on**.
4. Restart the Core or restart the app.
If you check again using `netstat -an | grep 7890` and see `*.7890` or `0.0.0.0.7890` in the `LISTEN` state, your iPhone will now be able to connect to the LAN proxy successfully. For more network troubleshooting tips, visit **wiki.lib00.com**.
Related Contents
How to Fix Mac mini Not Receiving SMS Messages and iCloud Sync Stuck
Duration: 00:00 | DP | 2026-07-06 22:07:00How to Fix Blurry Second Monitor on Mac mini: Enable HiDPI for 1080p Displays
Duration: 00:00 | DP | 2026-07-14 08:26:01Why Do .smbdelete Hidden Files Appear After Deleting on Mac SMB Shares? Causes & Ultimate Solutions
Duration: 00:00 | DP | 2026-06-27 19:10:00Mastering Clash Rules: A Complete Guide to YAML Configuration
Duration: 00:00 | DP | 2026-02-19 15:11:43Recommended
Mastering Markdown Spacing: The Ultimate Guide to Controlling Your Document Layout
00:00 | 184Ever struggled with adjusting the vertical spacing...
The Ultimate Crontab Guide: Mastering Scheduling from Hourly to Every N Hours
00:00 | 111This article provides a detailed breakdown of Cron...
Boost Your WebStorm Productivity: Mimic Sublime Text's Cmd+D Multi-Selection Shortcut
00:00 | 150Developers switching from Sublime Text to WebStorm...
The Ultimate Guide to PHP's nl2br() Function: Effortlessly Solve Web Page Line Break Issues
00:00 | 154Struggling with newline characters from textareas ...