Use this guide when v2rayN fails to start its core on Windows, reports that an address is already in use, or your browser cannot connect after a port change. Check the listening address and port, then identify the owning process. Close duplicate instances if safe; if both need to run, change the local inbound port. Finally, update the system proxy and browser and test the connection. Remote server ports are not changed here.
Know the Difference Between Ports 10808, 10809, and the Server Port
A local listening port is the entry point applications such as browsers use to connect to v2rayN. It is not the service port on the server. The client must bind to a local address before it can accept requests. If the log shows address already in use or “Only one usage of each socket address is normally permitted,” check for a local conflict first—not by reimporting your subscription, switching nodes, or changing TLS settings.
Inbound settings vary across versions and interface generations. Some older configurations use 10808 for SOCKS and 10809 for HTTP; configurations with a mixed inbound can serve HTTP and SOCKS on the same port. Don’t infer the protocol from the port number alone. Check the local inbound settings under Settings → Parameter Settings and confirm them in the startup log.
Find the Listening Process: Check the Port, Then the PID
Open Windows PowerShell and run the command below. Standard permissions are usually enough to view connections. If access to the process path is denied, reopen the terminal as an administrator. This command only checks TCP listeners; it does not stop processes or change network settings.
Get-NetTCPConnection -State Listen -ErrorAction SilentlyContinue |
Where-Object { $_.LocalPort -in 10808,10809,20808 } |
Select-Object LocalAddress,LocalPort,State,OwningProcess
Check LocalPort and OwningProcess. If a process ID is listed for port 10808, use the next command to verify its name and path. The value 1234 below is just an example PID—replace it with the actual number from your results. Don’t use PowerShell’s $PID as a placeholder; it refers to the current PowerShell process ID.
Get-Process -Id 1234 | Select-Object Id,ProcessName,Path
127.0.0.1is the IPv4 loopback address, usually available only to apps on this computer.0.0.0.0listens on all IPv4 interfaces and may conflict with a loopback binding on the same port.::1is the IPv6 loopback address;::is the IPv6 wildcard address. Whether it also accepts IPv4 depends on the socket settings.- Multiple rows for the same PID are not necessarily a problem. The process may be listening on both IPv4 and IPv6 or providing multiple local entry points.
If you prefer Command Prompt, you can run the command below. Check that the “Local Address” column ends with the target port and the state is LISTENING. Don’t mistake 10808 in a remote connection for a local listener. TIME_WAIT alone does not mean a process is providing proxy service.
netstat -ano -p tcp | findstr /C:":10808" /C:":10809"
tasklist /FI "PID eq 1234"
Identify the Process: Close a Duplicate or Change the Local Port
The process using the port could be another v2rayN instance, a core process left running after a previous exit, or another service you need. A matching process name does not prove it belongs to the current window, especially if the client was launched from two different folders. Check the process path and start time against the client directory actually in use.
Close the Duplicate Instance Normally
RecommendedOnce you’ve confirmed the old window is no longer in use, choose Exit from its tray icon and check the listening status again. If a leftover core process remains, verify its path in Task Manager before ending it, then restart the client you want to keep.
Best for: accidentally opening two client instances or an old instance not exiting cleanly
Change the Local Listening Port
Keep the existing service running and choose an unused port that isn’t excluded by Windows, such as 20808. Then update every local app still using the old port so the new core can start without leaving your browser connected to the old instance.
Best for: running multiple services at once or when the original port has a specific purpose
Change v2rayN’s Local Port and Restart the Core
These steps use the common Settings → Parameter Settings menu. Section names may differ between cross-platform desktop and classic interfaces. Look for fields such as “Local Listening Port,” “SOCKS Port,” “HTTP Port,” or the mixed inbound setting. Don’t change the server port for a subscription node.
-
Note the Current Settings
Note the current listening address and port, along with the system proxy status. For example, the current address might be
127.0.0.1:10808, with a separate HTTP port 10809 in an older configuration. Record only the local settings; there’s no need to copy subscription links or node credentials. -
Check the New Port
Use the PowerShell command above to confirm that nothing is listening on 20808. If you need a separate HTTP inbound, check the proposed 20809 port as well. No listener in the results only means that no TCP listener was present at that moment; also check the Windows excluded port ranges.
-
Change the Inbound Port
Go to Settings → Parameter Settings and change the local listening port in use from 10808 to 20808. If the configuration has a separate HTTP field and you need to change it, set 10809 to 20809 as well. A mixed inbound does not need a second entry point.
-
Save and Restart
Save the settings and let the client apply the changes. If the log doesn’t show the new listening port, exit v2rayN normally from the tray and relaunch it. Then check the PID listening on 20808 and confirm it belongs to the core started by the current client.
-
Reset the System Proxy
From the tray menu, choose System Proxy → Clear System Proxy, then select Set System Proxy Automatically. Menu labels may differ between versions. The goal is to make the system proxy use the current HTTP or mixed inbound address, not keep pointing to the old port.
If the proxy is for local use only, keep the loopback address. Don’t enable “Allow connections from the LAN” just to fix a port conflict: it changes the listening scope but won’t free the port that was already in use. The client’s inbound port is separate from switching between VMess and VLESS nodes or choosing a different routing rule.
Update the System Proxy, Browser, and Command Line
The easiest thing to miss after changing a port is the app connecting to it. Windows system proxy settings, manual browser proxy settings, and terminal environment variables may each retain the old value. Changing v2rayN alone won’t update every app. Check them one by one in the order below, and avoid changing nodes, DNS, or routing at the same time so the results are clear.
- Windows: Open Settings → Network & Internet → Proxy and check the address and port under “Manual proxy setup.” The system HTTP proxy must point to an HTTP-capable inbound; don’t enter a SOCKS-only port.
- Browser: If the browser uses the system proxy, it follows the system settings. If you’ve configured a separate manual proxy or proxy extension, update the port there too. Match the SOCKS5 or HTTP setting to the actual inbound protocol.
- Terminal: Check whether
HTTP_PROXY,HTTPS_PROXY, orALL_PROXYstill points to 10808 or 10809. After changing persistent environment variables, you usually need to restart open terminals. - Other apps: Download and development tools may have their own proxy settings. Update each one to use the new port. Traffic handled through TUN does not rely entirely on the system HTTP proxy, so test in standard system proxy mode first.
You can view the current process’s environment variables in PowerShell. If the output contains account information, review it locally and don’t paste it into a public forum.
Get-ChildItem Env: |
Where-Object { $_.Name -match '^(HTTP_PROXY|HTTPS_PROXY|ALL_PROXY|NO_PROXY)$' }
Verify the Fix: Separate the Local Entry Point from the Remote Connection
Test the TCP connection first, then the proxy protocol. A successful first command only confirms that a connection to the local port can be established; it doesn’t prove the node works. Next, run the HTTP or SOCKS5 test command that matches your inbound type. You don’t need to run both.
Test-NetConnection 127.0.0.1 -Port 20808
# For HTTP or mixed inbound
curl.exe --noproxy "" --proxy http://127.0.0.1:20808 --connect-timeout 5 --max-time 20 -I https://1v2ray.com/
# For SOCKS5 or mixed inbound
curl.exe --noproxy "" --proxy socks5h://127.0.0.1:20808 --connect-timeout 5 --max-time 20 -I https://1v2ray.com/
Using curl.exe explicitly avoids cases where some PowerShell environments interpret curl as a different command. socks5h sends the destination hostname to the proxy to resolve. The 5-second connection timeout and 20-second total timeout are test settings, not a speed guarantee. If you use a separate HTTP port, 20809, update the HTTP test command accordingly.
- Connection refused: Check the listener again. Confirm that the core started, the address is 127.0.0.1, and the port change was saved.
- Proxy protocol error: Check that you aren’t using a SOCKS-only port as HTTP or connecting to another running instance.
- HTTP response received: The request reached the local proxy entry point and received a response from the destination. Even a 403 or 405 status does not by itself indicate a port conflict.
- Entry point connects, but handshake times out: Check the core log, then investigate the node, transport, and remote service. A local port conflict is probably no longer the main issue.
Common Issues When No Process Appears to Be Using the Port
Why does binding fail when no process is listening?
First distinguish “address already in use” from “permission to access a socket was denied.” The latter may be caused by a Windows excluded port range, security policy, or the bind address. Run the netsh command below to view the ranges. If your new port falls within one, choose an available port outside the range instead of deleting a system reservation.
What if port 10808 is still listening after I exit the app?
Query OwningProcess again, then check the PID and file location in Task Manager’s Details tab. End the process only after confirming it’s a leftover core from the client you exited. If it reappears immediately, check for another client instance, a startup app, or a service that relaunches it.
Why does my browser stop working after I change the port to 20808?
First test with curl.exe and explicitly specify the new port. If that works, check whether the browser still has 10808 saved or a manual proxy extension is overriding the system settings. Then check the Windows Proxy page. Don’t change node settings again just because one app hasn’t been updated.
The conflict returns after every restart. Do I have to keep changing ports?
After restarting, don’t launch a second client instance manually. Check the PID on the original port first. Review Startup apps in Task Manager and your usual client folders, and keep one clearly defined way to launch the client. If you need multiple instances, assign each a fixed local port that doesn’t overlap.
netsh interface ipv4 show excludedportrange protocol=tcp
netsh interface ipv6 show excludedportrange protocol=tcp
The fix is complete when the expected core is listening on the new port, an explicit proxy test gets a response, and the system and apps point to the correct entry point. If the problem persists, note the local port, process name, exact error, and steps to reproduce it, then continue troubleshooting with Troubleshooting. Don’t include subscription URLs or node credentials.