v2rayN System Proxy Not Working: Fix Browser and Command-Line Proxy Issues

Fix browser proxy issues by checking extensions and proxy settings; troubleshoot terminal proxy failures by checking environment variables and ports, and learn when TUN mode makes sense.

At a glance

First verify the local port and server with an explicitly proxied request. Then check the browser’s proxy source and the terminal’s environment variables, and decide whether TUN is needed. This guide uses v2rayN on Windows and covers cases where the browser works but the terminal does not, or traffic goes direct despite system proxy being enabled. Check all example ports against your local settings.

Understand system proxy, local ports, and routing

v2rayN’s “Set system proxy” option mainly writes proxy settings to the operating system; it does not intercept traffic from every program. An app must read those settings to connect to the local proxy. Browsers usually do, while command-line tools vary, so different results on the same computer are no contradiction.

After a request reaches the local proxy, the core uses routing rules to decide whether to connect directly, use a proxy, or block it. Enabling the system proxy only gives an app a chance to send traffic to the core; it does not guarantee that every destination exits through a remote server. A successful subscription update or a latency result for a server does not replace testing an actual web request.

LayerWhat it doesKey evidence
App proxy settingsDecide whether to send requests to the local proxyBrowser settings, launch options, terminal arguments
Local inbound portAccept HTTP or SOCKS requestsListening address and port, core startup log
Routing and DNSDetermine how domains are resolved and where connections exitDestination and outbound tag in access logs
Remote serverEstablish and forward the proxied connectionActual request result, handshake errors, timeout records

Turn off TUN while troubleshooting and leave only one proxy client running. This prevents TUN from masking incorrect system proxy settings and reduces interference from having two traffic-capture methods active. If your device is managed by your organization, do not bypass its network policies.

Step 1: Verify the port and test with an explicit proxy

In v2rayN, open Settings → Parameter settings and check the local listening ports and inbound protocols. Review the core startup log as well. Depending on the version, HTTP and SOCKS may use separate ports or share a mixed port. Do not assume a port number is a fixed default based on an older guide. The separate ports below are examples, not a claim about the current version’s defaults.

10809
Example HTTP proxy port used in this guide
10808
Example SOCKS proxy port used in this guide
127.0.0.1
Local loopback address, not a remote server
  1. Note the ports

    Note the local HTTP or mixed port and the SOCKS port. If there is only one mixed port, use it for both tests. Do not enter the remote server port from your subscription.

  2. Start the core

    On the main screen, select the server you want to test and set it as active. Confirm that the log shows no startup errors. Use just one server and the same rules throughout testing.

  3. Check the listener

    Run the listener check below in PowerShell. If it returns no results, check core startup first. If another process owns the port, resolve the conflict before changing browser settings.

  4. Specify the proxy

    Use curl.exe to specify the proxy explicitly and check the HTTP response and any errors. In Windows PowerShell, typing curl directly may invoke an alias, so use the full program name here.

# Replace the ports with the values actually listening on your machine
Get-NetTCPConnection -State Listen -LocalPort 10809 |
  Select-Object LocalAddress, LocalPort, OwningProcess

# HTTP proxy: HTTPS requests are sent through a CONNECT tunnel
curl.exe --proxy http://127.0.0.1:10809 --noproxy "" --connect-timeout 10 --max-time 20 -I https://example.com/

# SOCKS5: the proxy resolves the destination hostname
curl.exe --proxy socks5h://127.0.0.1:10808 --noproxy "" --connect-timeout 10 --max-time 20 -I https://example.com/

--noproxy "" clears the bypass list for this explicit test. The example URL is only for checking the connection path; it does not indicate availability in any particular region. For further diagnosis, substitute the destination that is actually failing. An HTTP status from the destination means an HTTP response was received. Even a 403 or 405 differs from a failure to connect to the local proxy, but check the logs to confirm whether traffic exited through the remote server.

Browser not using the proxy? Check system settings and extensions

If the explicit proxy test succeeds but the browser still behaves unexpectedly, first make sure it uses the system proxy, then check its proxy extensions. Edge and Chrome generally use Windows proxy settings, but extensions, launch options, and organizational policies can change that behavior. Incognito mode does not necessarily disable extensions; some can run there if permitted.

  1. Set the system proxy

    Right-click the v2rayN tray icon and choose System proxy → Automatically configure system proxy. Do not select Clear system proxy, and do not assume that “Do not change system proxy” enables it automatically.

  2. Check the system address

    In Windows 11, open Settings → Network & internet → Proxy. Under Use a proxy server, check the address and port and make sure they match v2rayN’s HTTP or mixed inbound. Note any existing setup script so two configurations do not interfere with troubleshooting.

  3. Temporarily disable proxy extensions

    Temporarily turn off proxy-switching extensions in the browser’s extensions manager. Check whether the browser shortcut includes proxy launch options. Close all browser windows, reopen it, and visit the same test address.

  4. Check browser-specific settings

    In Firefox, go to Settings → General → Network Settings → Settings and select Use system proxy settings. If you choose manual configuration, check the HTTP and SOCKS settings and the list of addresses that bypass the proxy.

If only one website connects directly, check proxy exceptions and v2rayN routing. For example, the browser may exclude local network addresses, or a rule may send a domain through a direct outbound. Neither means the system proxy toggle is broken. You can briefly switch to a global proxy routing mode for comparison, then restore your original rules. Do not delete the entire routing setup.

Terminal not using the proxy? Try explicit options first, then environment variables

Command-line tools do not necessarily use the Windows system proxy. A terminal window is not a single, unified network client: in the same PowerShell session, curl.exe, a scripting runtime, and a package manager may each get proxy settings from a different source. Test the specific program first, then decide whether to set environment variables. A working browser does not mean the terminal is using the proxy.

For curl, https_proxy specifies which proxy to use for HTTPS destinations; its value can still be http://127.0.0.1:10809. Here, http:// describes the local proxy protocol. It does not mean the destination page uses unencrypted HTTP. If you mistakenly enter https://127.0.0.1:10809, the program may attempt a TLS handshake with a standard HTTP proxy port and fail.

# Record the old values first; these settings affect only this PowerShell session and new child processes
$oldHttpsProxy = $env:https_proxy
$oldNoProxy = $env:no_proxy

$env:https_proxy = "http://127.0.0.1:10809"
$env:no_proxy = "localhost,127.0.0.1"

# Without --proxy, check whether this program reads environment variables
curl.exe --connect-timeout 10 --max-time 20 -I https://example.com/

# Restore the original values when testing is complete
if ($null -eq $oldHttpsProxy) {
  Remove-Item Env:https_proxy -ErrorAction SilentlyContinue
} else {
  $env:https_proxy = $oldHttpsProxy
}
if ($null -eq $oldNoProxy) {
  Remove-Item Env:no_proxy -ErrorAction SilentlyContinue
} else {
  $env:no_proxy = $oldNoProxy
}

Run the setup, test, and restore commands separately; do not run the whole block at once and check the variables afterward. If you also need to proxy HTTP destinations, check the tool’s documentation for http_proxy. curl has specific case-handling rules for this variable, so lowercase is preferable in cross-platform scripts. ALL_PROXY can serve as a general fallback proxy in curl, but not all programs support it or accept SOCKS addresses.

Configuration methodScopeTroubleshooting notes
--proxyA single curl requestUseful for establishing a repeatable diagnostic baseline
$env:https_proxyCurrent PowerShell session and subsequently launched child processesOther terminals that are already running will not receive the new values
NO_PROXYTools that support the variableThe destination domain or wildcard rules may bypass the proxy
Tool-specific settingsThe relevant program or projectMay override environment variables; check each one

If environment variables have no effect, check the program’s own proxy options. You can test explicitly with PowerShell’s Invoke-WebRequest using -Proxy http://127.0.0.1:10809. Do not assume it reads the same variable just because curl works. WSL and containers also have separate network environments. Their 127.0.0.1 may not point to the Windows host, so check the host address and listening scope for your network mode.

Use the actual error to distinguish port, TLS, and remote timeouts

Keep the complete error from the failed request and note when it occurred, then compare it with the v2rayN log. The port below is an example; the actual error will show your port and wait duration. Do not share just the words “connection failed,” and do not publicly post full logs containing subscription URLs or credentials.

curl: (7) Failed to connect to 127.0.0.1 port 10809

Cause: The connection from your machine to the proxy listener was not established, commonly because the core is not running or the port is wrong. Fix: Check the listener and the process using the port, then verify the HTTP or mixed inbound. Switching remote servers usually will not fix a local connection failure.

curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed

Cause: The TLS handshake failed. Possible causes include an incorrect proxy protocol, the destination service, or local security software; this alone does not prove the server is faulty. Fix: Check that the proxy URL was not mistakenly set to HTTPS, verify the system clock, and compare with another destination. Do not hide the problem by disabling certificate verification.

curl: (28) Operation timed out after 20000 milliseconds with 0 bytes received

Cause: No data arrived within the configured time limit. The delay may occur during the remote connection, DNS lookup, or destination response. Fix: Retry with -v to see whether the proxy connection and CONNECT completed, then check the destination domain and outbound route in the core log.

If socks5h:// succeeds but a method that resolves locally fails, investigate the DNS resolution path first; this does not automatically mean a public DNS provider is at fault. Also check whether routing rules depend on domain resolution and whether DNS requests are sent through the expected outbound.

When to switch to TUN—and when to keep fixing the system proxy

Consider TUN when multiple apps have no proxy settings, managing their environment variables individually is impractical, or you need to capture more IP traffic. It routes traffic through a virtual network interface and generally covers more than the system proxy. Correct interception still depends on the core, permissions, routing, DNS, and app behavior, so TUN is not a universal fix for network problems.

Before enabling TUN, note the current system proxy and routing state. Grant the required permissions as prompted by v2rayN, then enable TUN in the interface. During testing, clear the system proxy and restore any temporary terminal variables to avoid routing apps through both an explicit proxy and TUN, which can make results hard to interpret. Check that the virtual interface, default route, and DNS are set up, then verify that local network services remain accessible.

Frequently asked questions and final checks

Why does the browser load pages while the terminal still times out?

Run the curl.exe --proxy test from this guide first. If the explicit option works but the regular command fails, check whether the tool reads environment variables and whether NO_PROXY includes the destination. Do not reinstall the client as a first step.

Web pages stopped loading after I quit v2rayN. How do I fix that?

Open Windows Settings → Network & internet → Proxy and check whether it still points to a local port that is no longer running. On a personal device, you can turn off that manual proxy. If you previously used an organizational proxy or setup script, restore its settings instead.

Which port should I enter for HTTP or SOCKS?

Use the local inbound protocol; do not guess from the name. Enter the HTTP port or a compatible mixed port in the browser’s HTTP proxy field. For SOCKS settings, use the SOCKS port or a compatible mixed port. Remote server port 443 is not a local proxy port.

The system proxy is on, but my exit IP has not changed. Is it not working?

Not necessarily. Check whether the exit-check domain matches a direct routing rule, then compare the core access logs. If access logging is off, enable it temporarily using the setting supported by your core, then turn it back off after troubleshooting. One lookup site cannot tell you how all apps are routed.

You only need one clear chain of evidence: the local port is listening, an explicit proxy request gets a response, the browser uses the right proxy source, the terminal program reads its own proxy settings, and the routing log shows the expected outbound. Check each layer in that order; it is more effective than repeatedly toggling the system proxy or switching servers. To reorganize subscriptions, servers, and startup steps, use the site’s quick-start guide to establish a clean baseline.

Download v2rayN