Clash Mixed Port 7890 and allow-lan: Share Your Proxy with Devices on Your Local Network
Learn how mixed-port handles HTTP and SOCKS5, configure phones and TVs to use your PC as a proxy, and set firewall rules without exposing your network.
What Is Mixed Port 7890, and What Does allow-lan Do?
mixed-port is mihomo’s proxy inbound port. A single listening port accepts both HTTP proxy and SOCKS5 connections; the client’s protocol handshake determines which one is used. If your PC’s local network address is 192.168.1.23 and the mixed port is 7890, you can enter the same address and port in your phone’s Wi-Fi settings or in apps that support SOCKS5. Choose the protocol each client supports.
7890 is a common configuration value, not a port that mihomo enables by default. The mixed port won’t be enabled unless mixed-port is configured; setting it to 0 also disables it. allow-lan defaults to false. Set it to true to allow connections from your local network, but successful access also depends on the bind address, firewall rules, and whether the devices can communicate with each other.
- HTTP proxy: This is the protocol typically used by a phone’s system Wi-Fi proxy setting. When a proxy-aware app accesses HTTPS, it creates a tunnel using HTTP
CONNECT; you don’t need a different proxy port for HTTPS sites. - SOCKS5 proxy: Choose this only in apps that explicitly support SOCKS5. Whether the app sends domain names to the proxy for DNS resolution depends on the app’s DNS settings; the mixed port itself doesn’t determine this.
- Routing rules: When the core is running in rule mode, requests received on this port are still matched against
rulesin the active configuration. They may use a proxy policy or matchDIRECT. Enabling LAN sharing does not change the rules.
Enable LAN Listening on Your PC: Check the Active Configuration First
First, find the PC’s actual IPv4 address on your home network. In Windows 11, run ipconfig in Terminal and check the “IPv4 Address” for the active Wi-Fi or Ethernet adapter. Don’t use the “Default Gateway,” a VPN adapter address, or 127.0.0.1. The examples below use 192.168.1.23 for the PC and 192.168.1.42 for the phone. Use the addresses assigned on your network.
mixed-port: 7890
allow-lan: true
bind-address: "192.168.1.23"
These are top-level YAML keys; don’t nest them under tun, dns, or proxy-groups. Merge this snippet into your existing configuration or persistent overrides, replacing any keys with the same names. Don’t use it to overwrite your entire subscription. bind-address defaults to "*", which listens on all addresses. This example specifies the PC’s LAN IPv4 address, so the proxy listens only on that address.
Menu names vary across clients. The “Allow LAN” toggle and “Mixed Port” field in the interface may override YAML settings. After changing them, reapply the configuration and verify the core’s actual listening address rather than relying on the toggle alone. In Windows PowerShell, run:
Get-NetTCPConnection -State Listen -LocalPort 7890 |
Select-Object LocalAddress, LocalPort, OwningProcess
With the example binding, LocalAddress should show 192.168.1.23. If it shows only 127.0.0.1, other devices can’t connect. If nothing is listening, check the active port and the core’s startup logs. If another process is using the port, resolve the conflict before changing the phone settings. If a subscription refresh resets the value, move the setting to a persistent override supported by your client, then refresh and verify it again.
Set Up a Phone or TV: Use the Proxy Server, Not the Default Gateway
Connect the phone or TV to a home network that can reach the PC. The PC can use Ethernet while the phone uses Wi-Fi, as long as they can communicate. Don’t switch the device to a manual IP configuration or change the router’s gateway or DNS settings as a substitute for proxy settings. Enter the PC’s LAN IP as the proxy server for the current Wi-Fi network or app.
- iPhone (iOS 18): Go to Settings → Wi-Fi → tap the info button next to the connected network → Configure Proxy → Manual. Enter
192.168.1.23for the server and7890for the port. Enter a username and password only if the proxy requires authentication, then save and test in a browser. - Android (Pixel with Android 15): Go to Settings → Network & internet → Internet → tap the gear next to the connected Wi-Fi network → Edit network. Under Advanced options, set Proxy to Manual, then enter
192.168.1.23as the hostname and7890as the port. Other manufacturers may put these options under “Modify network.” - TV: Look for “Proxy” or “HTTP proxy” in the advanced settings for the current network. If manual setup is available, enter the PC’s IP address and mixed port. If only a specific app offers SOCKS5, configure it in that app. If the TV only has IP, gateway, and DNS settings, don’t enter the PC’s IP in the gateway field; that won’t make the TV use an HTTP proxy.
The system Wi-Fi proxy affects only apps that honor the setting, and it doesn’t automatically apply to mobile data. If a browser works but a TV streaming app connects directly, the app may be ignoring the proxy setting; that doesn’t mean the port is broken. Enabling TUN mode on the PC won’t automatically connect your phone or TV. TUN and the explicit proxy configured here are separate ways to route traffic.
Allow Only the Devices You Need Through Windows Firewall
This example tests HTTP proxying, HTTPS tunneling, and SOCKS5 over TCP, so an inbound rule allowing TCP 7890 is sufficient. In Windows 11, press Win + R, enter wf.msc, then open Inbound Rules → New Rule → Custom. Under Protocol and Ports, select TCP and enter 7890 for the local port. Under Scope, limit the remote IP addresses to devices you want to allow, such as 192.168.1.42. Select Allow the connection. On the Profile page, check Private only, and make sure the PC is connected to a trusted home network set to Private.
If the port still isn’t reachable, don’t disable the firewall. Check the PC’s network profile, the rule’s scope, and the phone’s current IP. Then make sure the phone isn’t connected to a guest Wi-Fi network. Guest network isolation or wireless client isolation can block connections between the phone and PC. Both devices may have internet access and still be unable to reach each other.
Can’t Connect to Port 7890? Check TCP, Proxy Requests, and Routing in Order
If you have a second Windows PC, run these three commands on the same local network. The first checks TCP connectivity only; the other two send a request to an example site over HTTP and SOCKS5. socks5h sends the destination hostname to the SOCKS5 proxy for resolution. If the test PC has NO_PROXY set, make sure the test domain isn’t excluded from proxying.
Test-NetConnection -ComputerName 192.168.1.23 -Port 7890
curl.exe -I --max-time 15 --proxy http://192.168.1.23:7890 https://example.com/
curl.exe -I --max-time 15 --proxy socks5h://192.168.1.23:7890 https://example.com/
| What You See | What to Check Next |
|---|---|
TcpTestSucceeded : False |
Check the PC’s IP address, port, listening address, and firewall first. Then check whether the devices are isolated on a guest network. You don’t need to switch proxy nodes yet. |
HTTP proxy returns 407 |
The request reached the HTTP proxy, but authentication failed. Check the username and password, or confirm that the device supports the proxy’s authentication method. |
Only 200 Connection established appears, then the request times out |
This is the HTTP proxy’s response to the tunnel request, not the destination site’s final status. Check the core logs for the destination domain, matched rule, and outbound connection errors. |
The browser can connect, but the logs show DIRECT |
The request may have passed through the PC’s mixed port but gone directly to the internet from the PC. Check the active mode and matched rule; a page loading successfully doesn’t prove traffic used a remote proxy node. |
If you can test only with a phone, save the Wi-Fi proxy settings and make a new browser request. Then compare its time, source IP, and destination domain with the connection logs on the PC. If the browser request appears in the logs but another app’s doesn’t, check whether that app uses the system proxy. If the request matches a proxy policy but fails, check which node is selected in that policy group and whether the destination site is reachable.
To stop sharing, first turn off or remove the Wi-Fi proxy settings on the phone and TV. Then disable “Allow LAN” on the PC and remove the temporary inbound firewall rule. If you do this in the opposite order, devices may keep sending requests to the now-disabled 7890, leaving them connected to Wi-Fi but unable to load pages.