Clash Mixed Port mixed-port and LAN Sharing: Use Your PC Proxy on Phones and TVs

Learn how mixed-port handles HTTP and SOCKS5, configure allow-lan and the bind address, and set firewall rules so phones and TVs can connect to your PC proxy.

mixed-port: One port for two proxy protocols

mixed-port: 7890 means Clash accepts both HTTP proxy and SOCKS5 connections on the same TCP listening port. The core identifies the protocol from the data at the start of each connection. Manual proxy settings for a phone's Wi-Fi typically use HTTP. Apps that support SOCKS5 can use the same port, but you must select the correct protocol in the app. When you visit an HTTPS site, the browser usually opens a CONNECT tunnel through the HTTP proxy, so the device should still be set to use an HTTP proxy.

The mixed port is the entry point for traffic into Clash; it doesn't determine which node handles it. Once traffic reaches the core, requests are processed according to the mode and configuration on the PC. For example, in rule mode, requests that match DIRECT connect straight to their destination, while requests that match a proxy group are forwarded using that group's current selection. So if a webpage opens in your phone's browser, that doesn't necessarily mean the request went through a proxy node.

On the PC: Enable allow-lan and bind to a LAN address

  1. First, check your network and IP address. On Windows, run ipconfig in a terminal and find the IPv4 address for your current Wi-Fi or Ethernet adapter. On macOS, go to System Settings → Network → select your active connection → Details → TCP/IP. Use the address for the network adapter connected to your home router. Don't use a loopback address, a VPN's virtual adapter address, or the router's gateway address.
  2. First, make sure Clash is handling requests correctly on the PC. Open the client's connection log, visit a webpage on the PC, and check that a matching entry appears. Review the rule that was applied. This helps separate subscription or node issues from LAN connectivity problems.
  3. Configure the shared proxy endpoint. In the client, look for Allow LAN connections and the mixed port setting. Menu locations vary by client version. If you're using a configuration override or local YAML file, add the fields below at the top level of the active configuration. If a field already exists, edit it rather than adding a duplicate.
mixed-port: 7890
allow-lan: true
bind-address: '192.168.1.23'

In this example, 192.168.1.23 is the PC's LAN IPv4 address. Replace it with the actual address. Save and reload the configuration, then check the active listening address and port. Binding to a specific address limits which network interfaces listen for connections. If the PC's system proxy still points to 127.0.0.1:7890, apps on the PC may need their proxy address updated after you bind only to the LAN address. Setting bind-address: '*' exposes the listener on more interfaces, so don't use it as your default troubleshooting fix.

If your configuration comes from a subscription, use the client's settings or a local override where possible. Manual edits may be overwritten when the subscription updates. If your PC's IP address is assigned by DHCP, you can reserve an address for it in your home router to keep your phone and TV from pointing to an outdated address after the PC reconnects.

Firewall: Allow TCP port 7890 only for the devices that need access

A successful listener doesn't guarantee that other devices can connect. For Windows 11, use the Private network profile on a trusted home network. Run wf.msc to open Windows Defender Firewall with Advanced Security, then add an inbound rule allowing local TCP port 7890. Select the Private profile only. If the client is listening on 7891, use 7891 instead.

Open the rule's Properties → Scope and limit the remote IP addresses to the phones and TVs that need access. For example, if your phone is 192.168.1.34 and your TV is 192.168.1.40, add only those two addresses. If their addresses change, reserve them, or—after confirming the subnet mask is 255.255.255.0—limit access to your actual home subnet as needed, for example 192.168.1.0/24. Don't disable the entire firewall for troubleshooting, and don't forward 7890 to the internet on your router.

On macOS, go to System Settings → Network → Firewall → Options and check whether the app handling proxy connections is blocked from accepting incoming connections. macOS manages this by app, rather than by port and remote address like Windows. If the client runs the core as a separate process, first identify which process is listening on the port, then address any firewall prompt for that app.

On your phone or TV: Enter the PC's IP address and HTTP proxy port

Manual HTTP proxy settings: Example
Device Where to find the setting Example values
iPhone / iPad Settings → Wi-Fi → Info button next to the current network → Configure Proxy → Manual Server 192.168.1.23, port 7890
Android phone Open the settings for the connected Wi-Fi network and look for Proxy → Manual under Advanced options. The menu may vary by manufacturer. Proxy hostname 192.168.1.23, proxy port 7890
TV Open the settings for the connected Wi-Fi or wired network and look for Proxy. Enter the details if a Manual option is available. Host 192.168.1.23, port 7890

Enter the host and port separately; don't include http:// in the host field. Leave authentication turned off unless you've configured proxy credentials. Don't change the router gateway or the device's DNS to the PC's address. This setup only lets apps that support it use a proxy; it doesn't make the PC the phone or TV's default gateway.

Open a webpage in your phone's browser, then launch the app you want to use on the TV. Check the PC's connection log for each device. A manual Wi-Fi proxy usually applies only to the current network and apps that follow the system proxy settings. If the TV has no proxy settings, or an app ignores the system proxy, setting allow-lan on the PC alone won't route that app's traffic through Clash. Enabling TUN on the PC won't automatically capture traffic from other devices to the router, either.

Can't connect? Check the listener, network, then rules

First, check that the port is listening on the LAN address

Run the first command in PowerShell on the PC running the proxy. If you have another Windows PC with firewall access, run the second command on that device. The second test checks the connection from another device to the proxy PC, so it's more useful than connecting to your own port from the proxy PC.

Get-NetTCPConnection -State Listen -LocalPort 7890
Test-NetConnection -ComputerName 192.168.1.23 -Port 7890
  • No listening address found: Check that the core is running, the configuration has been reloaded, and the port hasn't changed. If the only listening address and port shown are 127.0.0.1:7890, check the active values for allow-lan and bind-address.
  • TcpTestSucceeded: False: First, verify the PC's current IP address and the remote address range in the firewall rule. Then check whether the phone or TV is connected to guest Wi-Fi and whether the router has client isolation enabled. Devices connected to the same router may still be blocked from communicating with each other.
  • TcpTestSucceeded: True: This only confirms that the TCP port is reachable; it doesn't verify the proxy protocol or outbound connection. Next, test an actual HTTP or SOCKS5 request.

Send a request that explicitly uses the proxy

On another computer that's allowed to connect, run the two commands below if curl is installed. In Windows PowerShell, you can use curl.exe instead of curl. If NO_PROXY is set on that computer, make sure the test domain isn't excluded.

curl --max-time 15 --proxy http://192.168.1.23:7890 --head https://example.com/
curl --max-time 15 --proxy socks5h://192.168.1.23:7890 --head https://example.com/

socks5h means the destination hostname is resolved through the SOCKS5 proxy. When using an HTTP proxy to access HTTPS, the output may first show 200 Connection established. That only confirms the CONNECT tunnel was established; check for a response from the destination site afterward. If the client logs the connection but the request still times out, check the matched rule, selected node, and any DNS or connection errors in the logs. If the browser works but the TV app never appears in the connection log, first check whether the app follows the TV's system proxy settings instead of repeatedly changing ports.

When you're done sharing, turn off the Wi-Fi proxy on your devices, then disable allow-lan on the PC and remove the inbound rule you added for this setup. Otherwise, devices may keep trying to connect to the old proxy address when the PC is asleep, shut down, or away from your home network.

Download Clash