· Getting Started · 8-minute read

Clash First-Run Setup: System Proxy, TUN Mode, and Port Conflicts

A practical first-run checklist for Clash on every platform: permissions, system proxy settings, TUN setup, and port conflicts, with common causes and fixes.

Select a Configuration Before Enabling the Proxy

Seeing a subscription in the profile list only confirms that it was imported. Select the profile you just added and make sure it is the active one, then check the runtime log for configuration parsing or listener errors. For your first desktop test, turn off the system proxy and TUN, and note the local listening port shown by the client. That way, you won't mistake an old port for the current setting later.

  1. Check the mode. Start in Rule mode to verify how traffic is routed. If a rule matches DIRECT, that connection is going direct according to the configuration. A page loading successfully doesn't tell you whether it went through the proxy.
  2. Check the selected proxy group. When testing a site that requires a proxy, choose a known working node in the proxy group first. Open the site, then check its domain, matched rule, and outbound connection in the client's connection list. If the browser reuses a connection, close that tab and reopen it; if needed, restart the browser and try again.
  3. Enable only one traffic-capture method at a time. On desktop, test the browser with the system proxy first. Try TUN only if the target app ignores system proxy settings and can't easily be configured to use a proxy directly. This makes it easier to tell whether the local proxy failed to start or traffic never reached the client.

Enable the System Proxy and Check the Address and Port

The system proxy directs apps that honor system proxy settings to a local proxy port. It doesn't automatically capture traffic from every process. For example, with a mixed port of 7897, a manual HTTP proxy is usually set to 127.0.0.1:7897 when the core and client run on the same computer. This is only an example; use the port in your current configuration. If HTTP and SOCKS use separate listeners, don't enter socks-port in the system's HTTP proxy field.

SystemWhere to checkWhat to check
Windows 11Settings → Network & internet → Proxy → Manual proxy setupCheck the proxy server address and port. If you normally use a proxy script provided by your organization, note the existing settings before changing anything.
macOS 15System Settings → Network → Select the current network service (such as Wi-Fi) → Details → ProxiesCheck the server and port for Web Proxy (HTTP) and Secure Web Proxy (HTTPS). If you switch to a wired connection, check the settings for that network service too.
Linux(Ubuntu 24.04 GNOME)Settings → Network → Network ProxyDesktop proxy settings are separate from shell environment variables. Check each terminal tool and background service individually to see whether it uses a proxy.

Test the Local Proxy with a Single Request

If you're not sure whether the system setting failed to apply or the proxy port itself is unavailable, use curl with an explicitly specified HTTP proxy. In Windows PowerShell, use curl.exe; replace 7897 in the command with your actual HTTP or mixed port. The command works whether or not the client has enabled the system proxy, and it doesn't change system settings.

curl -v --max-time 15 --proxy http://127.0.0.1:7897 --noproxy "" https://clash-sub.com/

Use TUN for Apps That Ignore System Proxy Settings

TUN routes traffic to the core through a virtual network interface and routing rules. Once traffic enters TUN, the configuration still determines whether it goes direct or through a proxy; enabling TUN doesn't switch to Global mode. For testing, turn off the system proxy first. Otherwise, the browser may connect through a different route and make it look as though TUN is working.

Desktop: Install the Service or Grant Permissions, Then Check Routing

Mobile: Check System VPN Authorization

On Android, a client using VpnService prompts for system VPN authorization the first time it connects. If you cancel, the subscription may still appear imported, but traffic won't enter the VPN. If the connection drops right after authorization, search for “VPN” in Settings and check whether another VPN is connected or always-on VPN is enabled. Don't change management policies on a work-managed device. On iOS, clients that route traffic through the system VPN usually ask to add a VPN configuration. Check the active connection under Settings → General → VPN & Device Management → VPN. Desktop service installation steps don't apply to phones.

If you can no longer reach your work network or local devices only when TUN is on, turn TUN off first and check whether the original connection comes back. Then compare the route ranges and DNS settings for the original VPN and TUN, along with their local network subnets. If hostnames fail but private IP addresses work, check DNS first. If both fail, check routes or overlapping subnets. Switching to Global mode won't resolve a routing conflict.

Port Already in Use? Find the Process, Then Change the Right Setting

If an old client, background service, or another program is already listening on the same address and port for the same protocol, the new core may fail to bind. Note the port reported in the startup log. The example below uses 7897 and checks TCP listeners; if the log specifically reports UDP, check UDP on the relevant system instead.

SystemCommandWhat to check
Windows PowerShellGet-NetTCPConnection -LocalPort 7897 -State ListenNote OwningProcess, then find the matching PID in the Task Manager's Details tab.
macOSlsof -nP -iTCP:7897 -sTCP:LISTENCheck COMMAND and PID to see whether the process is an old client still running in the background.
Linuxss -ltnp 'sport = :7897'Check the listening address first, then the process details. If you don't have sufficient permissions, only the listener may be shown.
  1. If an old client is using the port: Quit it completely from the system tray or menu bar. If the old core is managed by a service, stop that service as described by the client. Closing the window may not stop the process. Check the owner of any unfamiliar process before taking action; don't terminate it blindly.
  2. If the process using the port needs to keep running: Choose an unused port—for example, check 7898 first. If the conflict is with mixed-port, change the mixed port in the client's port settings or persistent overrides. Editing the YAML generated by a remote subscription directly may be undone the next time it updates.
  3. Update all proxy entry points after reloading. Confirm that the core is listening on the new port, then check the system proxy and any proxy addresses entered in apps. Turn the client's system proxy off and back on, and verify that the new settings were applied. If the log reports an error for external-controller, change the controller interface—not the mixed port. Update the dashboard address accordingly, and keep the controller listening on a loopback address for local use.

Check Again After Quitting, Restarting, or Updating a Subscription

A first-run check isn't complete just because one web page loads. Turn off the system proxy or TUN in the client, then quit normally and confirm that the system has returned to its pre-install proxy settings. If your connection drops after quitting, check whether the system still points to a local port that's no longer listening. If you were using an organizational proxy, restore its settings rather than simply turning the proxy off.

Download Clash