V2Ray Port in Use on Windows: Find the Conflicting Process and Change the Listening Port

Find the process using ports 10808 or 10809 with built-in Windows commands, change v2rayN's local SOCKS and HTTP listening ports, and update related proxy settings.

At a glance

When v2rayN reports a port conflict on Windows, check the address and port in the log to identify the listening process. Then decide whether to close a duplicate instance or change the port. After changing it, update Windows proxy settings, apps with manual proxy settings, and command-line environment variables so they don't keep connecting to the old address.

Check the log first: the conflict is on the local listener, not the server port

If the log shows listen tcp 127.0.0.1:10808: bind: ..., the core failed to create a local TCP listener. Check the local port; don't change your subscription, server port, or routing rules. Routing happens after the core receives a request. If the listener never starts, changing the routing mode won't help.

App requestLocal listenerCore receives requestRoute matchOutbound connection
10808
Common local SOCKS or mixed port
10809
Common HTTP port in older separate-listener setups
17880
Example replacement port; check availability first

In older setups with separate listeners, SOCKS commonly uses 10808 and HTTP uses 10809. If the settings page shows a “mixed port,” SOCKS and HTTP share one listening port. Don't infer the active configuration from the version number or port alone. Check the settings fields, then confirm against the current startup log and Windows listener records.

Only one usage of each socket address (protocol/network address/port) is normally permitted.

Cause: Windows refused the bind because an overlapping address and port are already in use for the same protocol. Fix: Check which process is listening on the reported port. Once you confirm what it is, close the duplicate instance or assign different ports to the two programs.

An attempt was made to access a socket in a way forbidden by its access permissions.

Cause: Windows refused the bind, possibly because the port is in a system-excluded range or is reserved for an exclusive bind. Fix: Check the listener records and excluded port ranges, then choose an available port that isn't excluded. Don't delete system reservations as a first step.

Find the process using the port with PowerShell

After the error, preserve the current state rather than rushing to restart your PC. Open PowerShell and check for TCP listeners on these ports. If the log reports a different port, substitute that number in the command. Check LocalAddress, LocalPort, and OwningProcess; the last column is the process ID.

Get-NetTCPConnection -State Listen |
  Where-Object { $_.LocalPort -in 10808,10809 } |
  Select-Object LocalAddress,LocalPort,OwningProcess

For example, if the process ID on the 10808 row is 4321, use the command below to check the process name and executable path. Replace it with the ID you found. If the path is blank, check the PID in Task Manager's Details tab; run the query as an administrator if needed. If the process has exited, check the listeners again rather than relying on an old PID.

Get-Process -Id 4321 | Select-Object Id,ProcessName,Path

Next: verify the executable path before closing anything

A process with the same core name may belong to another v2rayN folder. If it's a duplicate instance, exit from that instance's tray menu and check the port again. If the listener belongs to a program that still needs to run, change the port in the current v2rayN instance. Don't terminate processes in bulk based on their names.

Change the SOCKS or HTTP listening port in v2rayN

The example below uses 17880 as the new port. If your version has separate listeners and derives the HTTP port by adding one to the base port, check 17881 too. Update the TCP query above with these values. No listener found means only that no TCP listener was detected at the time of the query; it doesn't guarantee Windows will allow the bind.

  1. Note the current settings

    Record the current ports and the system proxy status shown in the tray. If system proxy auto-configuration is enabled, you can first select “Clear system proxy” from the tray's “System Proxy” menu to keep apps from sending requests to the old port during the change.

  2. Open the basic settings

    In the main window, go to “Settings” → “Parameter Settings,” then open the Core basic settings page. Check whether the inbound field is labeled “Mixed Port” or, in older versions, “Local Listening Port” or similar. This is the local entry point, not the remote port in the server editor.

  3. Set the new port

    For a mixed listener, enter 17880; SOCKS and HTTP will both use this port. In older versions that derive the HTTP port from the base port, change the base port to 17880 and expect HTTP on 17881. After saving, check the actual listeners. Don't apply the +1 rule to a mixed listener.

  4. Restart and check again

    Save the settings and check the current core startup log. If the core still uses the old configuration, exit v2rayN from the tray and start it again. Check the new port and confirm the listening address, port, and owning process. For local apps only, keep the listener on loopback; enabling LAN access won't resolve a port conflict.

If no listener appears before or after changing ports and Windows reports that access to the socket was denied, check the system's excluded port ranges. The commands below show the IPv4 and IPv6 TCP exclusion ranges. For a UDP conflict, replace tcp in the commands with udp. If a candidate port falls between a range's start and end values, choose another port.

netsh interface ipv4 show excludedportrange protocol=tcp
netsh interface ipv6 show excludedportrange protocol=tcp

Update proxy settings and test SOCKS and HTTP separately

A listener on the new port doesn't mean every app is using it. Test the local proxy protocols first, then restore the system proxy settings you need. In particular, after changing an older setup to a mixed listener, apps with manual HTTP proxy settings may still point to 10809, even if browsers using the system proxy are working.

Connection methodWhat to changeWhere to verify
Windows system proxyTo configure it automatically, select “System Proxy” → “Set system proxy” from the v2rayN tray menu.In Windows “Settings” → “Network & internet” → “Proxy,” check the HTTP or mixed listening port.
App-specific proxyKeep the app's existing SOCKS or HTTP proxy type, and update its address and port to match the new listener.Check the app's own proxy settings; it may not use the Windows system proxy.
Terminal and developer toolsCheck HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and each tool's own proxy settings. Update only the entries actually in use.Check both the current terminal and newly opened terminals. Changing the current session doesn't update startup scripts, and changing persistent settings doesn't refresh already running processes.

In PowerShell, use curl.exe with an explicitly specified proxy to avoid mixing app behavior with whether it follows the system proxy. The example assumes a mixed port of 17880; with separate listeners, use the confirmed HTTP port in the second command. --noproxy "" prevents the existing proxy bypass list from affecting this test.

curl.exe -v --noproxy "" --connect-timeout 5 --max-time 15 --proxy socks5h://127.0.0.1:17880 https://example.com/
curl.exe -v --noproxy "" --connect-timeout 5 --max-time 15 --proxy http://127.0.0.1:17880 https://example.com/
Download the client