At a glance

This guide is for desktop users whose v2rayN core fails to start or whose browser still cannot connect after changing a local port. Check the log for the address and port that failed to bind, then identify the process listening on it. If you need to keep the existing service, change v2rayN’s inbound port and check your system proxy and app settings one by one.

Check the log for a local bind failure

Start with the log from the latest launch. Note the listening address, port, and transport protocol near the error. A failure to bind 127.0.0.1:10808 means the core could not open that local endpoint. It does not mean your subscription is invalid or that you need to change the remote node’s port. Troubleshoot node connectivity only after the local endpoint starts successfully.

Error: bind: address already in use

Cause and fix: Another socket is using the requested address and port. Find the listening process, then decide whether to exit the old instance normally or assign a different port to the current one.

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

Cause and fix: Windows may return this error when it refuses a bind, even when no listener is visible. If no listening process appears, check the IPv4 TCP excluded port ranges with netsh interface ipv4 show excludedportrange protocol=tcp. Choose a candidate port outside those ranges; do not delete system reservations.

Find the process listening on a port

Run these commands in Windows PowerShell. The first filters for local TCP listeners, so it will not match a connection just because its remote port is 10808. The second tries to retrieve the program name and path. If the path is blank, the process may still exist; use its PID to check the Details tab in Task Manager.

$listeners = Get-NetTCPConnection -State Listen -LocalPort 10808,10809 -ErrorAction SilentlyContinue
$listeners | Select-Object LocalAddress, LocalPort, OwningProcess
$listeners | ForEach-Object {
    Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
} | Select-Object -Unique Id, ProcessName, Path

On macOS or Linux with lsof installed, check each port separately. Look at PID, COMMAND, and the listening address. Without elevated permissions, you may not be able to see processes owned by other accounts. If the startup log reports a UDP bind error, check UDP endpoints instead—for example, on Windows run Get-NetUDPEndpoint -LocalPort 10808. Do not draw conclusions from a TCP query.

lsof -nP -iTCP:10808 -sTCP:LISTEN
lsof -nP -iTCP:10809 -sTCP:LISTEN

Move the current instance if you need to keep the old port

If the listening process is still needed, keep its configuration as is. Move v2rayN to another port you have checked, and update only the apps that are supposed to connect to v2rayN.

Change the SOCKS and HTTP inbound ports

First check which port configuration your version uses. The fields can vary across v2rayN 7.x releases: if the interface shows a local mixed listening port, SOCKS and HTTP share one port. If it has separate SOCKS and HTTP fields, check each one. Do not assume every version has an HTTP endpoint on 10809 or that it is always one higher than the SOCKS port.

  1. Record the current settings

    In the Windows desktop app, open Settings → Parameter Settings from the main window, then check the local listening fields under the Core settings. Record the existing ports, listening type, and system proxy status so you can restore them if needed.

  2. Check candidate ports

    Replace the ports in the earlier queries with 18080,18081. These are examples only. No query results means no listener was found at that time; a successful bind after startup is the definitive check.

  3. Set the inbound ports

    For a mixed listener, enter 18080. For separate ports, set SOCKS to 18080 and HTTP to 18081. Save your changes and restart the core or client as prompted. If the proxy is for local use only, keep it on the loopback address; do not enable LAN sharing just to resolve a conflict.

  4. Verify which process owns the listener

    Check the new ports again. Confirm that the owner is the core process started by the current client and that the latest log contains no bind errors. If the port still is not listening, resolve the startup error before changing browser settings.

Update system proxy and app settings

Core listenerProxy addressProtocol matchTest a request

Changing the local inbound port changes only the proxy entry point on your computer; it does not change your subscription or the remote node’s port. If v2rayN manages the Windows system proxy, once the core is running, use the tray menu’s System Proxy option to select “Set system proxy,” then verify the address and port actually applied. On devices managed by workplace policies, keep the existing settings and first check who manages the proxy.

The two examples below use the separate-port configuration described above. On Windows, call curl.exe explicitly; on macOS or Linux, use curl instead. If you use a mixed listener on 18080, use that port in both commands.

curl.exe -I --max-time 10 --proxy http://127.0.0.1:18081 https://example.com/
curl.exe -I --max-time 10 --proxy socks5h://127.0.0.1:18080 https://example.com/

If a command cannot connect to the loopback port, recheck the listening address and process. If it connects to the local proxy but the tunnel or request to the destination fails, check outbound connections and DNS resolution in the core log. If the command works but the browser does not, check the browser’s proxy settings and exception rules instead of changing the port again. To revert, restore the old port in both the client and dependent apps, and first confirm that the port is available.