v2rayN System Proxy Not Working: Troubleshoot Browsers and Command-Line Tools

Browsers often bypass the proxy because of extensions or PAC settings, while terminals usually need proxy environment variables. Follow separate checks for each, and learn when TUN mode can simplify setup.

At a glance

A system proxy gives applications a proxy endpoint; it does not route every connection automatically. This guide covers Windows setups where v2rayN is running but a browser or terminal still connects directly. First verify the local listener, then check the browser's proxy settings, and finally configure the terminal separately. Comparing the same URL through the same endpoint with the core logs helps distinguish an app that bypasses the proxy from a direct routing rule or a failed node connection.

First, understand system proxies, app proxies, and routing

Enabling the system proxy does not mean every program uses v2rayN. Windows proxy settings only apply to apps that read them; browsers usually do, while many command-line tools rely on their own options or environment variables. If a browser works but a terminal does not, that alone does not mean the node is broken.

LayerPurposeWhat to check
System proxyProvides a proxy address to apps that follow system settingsWindows proxy address, port, and bypass list
App proxySets an endpoint through a browser extension, command-line option, or similar settingWhether it overrides system settings or retains an outdated port
Core routingDecides whether requests entering the core use a direct or proxy outboundRule order, matching rule, and outbound tag
TUN modeCaptures eligible traffic through a virtual network interfacePermissions, routes, DNS, and exclusions

Keep variables fixed while troubleshooting. Temporarily turn off TUN, leave only one proxy client running, and choose one node and one test URL. The examples use https://example.com to demonstrate a request; it is not a dedicated test site for determining regional access. To investigate the actual issue, repeat the test with the URL that originally failed.

Step 1: Is the local proxy port listening?

Verify the local endpoint before changing browser settings. The examples below use 127.0.0.1:10808, an endpoint confirmed to support HTTP proxying; this is not a promise that every version uses this default port. If the client shows a different port, update it in every command. Do not confuse HTTP and SOCKS ports from older guides.

127.0.0.1
The local loopback address, not the remote node address
10808
Example HTTP proxy endpoint port used in this guide
10 seconds
Connection timeout for the example commands
  1. Check the endpoint

    In v2rayN, open “Settings” → “Parameter Settings” and check the local listening port and protocol under Basic Settings. Menu group names may vary between versions. Also check the main window status and core startup logs; do not infer the protocol from the port number.

  2. Confirm the listener

    Run Test-NetConnection in PowerShell. If TcpTestSucceeded is False, check whether the core has stopped and whether the port is correct, then review the startup logs.

  3. Check the process

    Use netstat to find the listening entry and PID, then check the process in Task Manager under “Details.” A reachable port only means some program is accepting connections; it does not prove that the listener belongs to the core launched by the current v2rayN instance.

  4. Send an explicit request

    Use curl.exe --proxy from the next section to specify the endpoint directly. If it works, move on to the system proxy; if it fails, first check the endpoint protocol, node settings, and core errors.

Test-NetConnection -ComputerName 127.0.0.1 -Port 10808
netstat -ano | findstr ":10808"

If the core log shows address already in use, resolve the port conflict first. Do not terminate an unfamiliar process. Identify the program, close duplicate instances or change the local port, then reapply the system proxy settings.

Browser not using the proxy? Check system settings, extensions, and PAC

The key to troubleshooting a browser is finding which proxy source is actually in effect. In Edge or Chrome, system settings, proxy extensions, startup flags, and organization policies can all affect connections. Seeing the v2rayN tray icon does not prove the browser is using it.

  1. Apply the system proxy

    From the v2rayN tray menu, select “System Proxy” → “Set system proxy.” Then open Windows “Settings” → “Network & Internet” → “Proxy” and check that the manual proxy address and port match the current local endpoint.

  2. Disable proxy extensions

    In the browser, open “Extensions” → “Manage extensions,” temporarily disable any extension that manages proxies, and restart the browser. Do not rely only on an Incognito window: some extensions are allowed to run in Incognito, and browser policies still apply.

  3. Check the automatic configuration script

    On the same Windows “Proxy” page, check “Use setup script.” If enabled, verify the script address and rules. Note the original settings, then temporarily switch to a single manual proxy endpoint to prevent PAC returning DIRECT and confusing the test.

  4. Retest and check the logs

    Close and reopen the browser, visit the same test URL, and watch the core access logs. If the request reaches the core, check its outbound tag too: a direct routing rule is a routing decision, not a system proxy failure.

PAC determines which proxy receives an app's request; core routing determines where that request goes next. Either layer can result in a direct connection, but the fix is different. Do not rewrite PAC, DNS, and all routing rules just to proxy one website.

Diagnosis: If explicit proxying works, check the browser endpoint first

If curl succeeds for the same URL with an explicitly specified proxy, but the browser request does not appear in the enabled access logs, check extensions, PAC, and browser policies next. Do not start by changing VMess, VLESS, or transport settings.

Terminal not using the proxy? Try curl options, then set environment variables

Command-line programs usually do not switch to the proxy just because the Windows system proxy is enabled. Test with an explicit option first, then consider environment variables. In PowerShell, use the full command curl.exe to avoid the curl alias invoking a different command with different argument behavior.

Test the HTTP proxy endpoint with a single request

This command does not rely on the system proxy. For this request, --noproxy limits the bypass target to the reserved test domain unused.invalid, preventing an existing NO_PROXY setting from unexpectedly sending example.com directly. The command does not change persistent settings.

curl.exe --proxy http://127.0.0.1:10808 --noproxy unused.invalid --connect-timeout 10 --verbose --head https://example.com

In verbose output, the connection to 127.0.0.1 and the HTTPS CONNECT exchange can confirm the endpoint is being used; the HTTP response code reflects the subsequent request result. A response does not necessarily mean traffic passed through the remote proxy node, so also check the core's outbound logs. Remove credentials and sensitive addresses before sharing logs.

Set a proxy for the current PowerShell session

$env:HTTP_PROXY = "http://127.0.0.1:10808"
$env:HTTPS_PROXY = "http://127.0.0.1:10808"
$env:NO_PROXY = "localhost,127.0.0.1,::1"

curl.exe --connect-timeout 10 --head https://example.com

It is valid to use http:// for HTTPS_PROXY: it describes the connection from the terminal to the local HTTP proxy endpoint, while HTTPS destinations are typically accessed through a CONNECT tunnel. Do not change the proxy endpoint to https:// just because the destination URL uses HTTPS.

  • Scope: These PowerShell assignments apply only to the current session and child processes started afterward. Other terminals that are already running will not inherit the variables.
  • Tool-specific behavior: Environment variables are not a universal enforcement mechanism. Some tools require lowercase variables, their own configuration, or command-line options; check the tool's documentation.
  • Terminal environments: WSL and containers may have separate network environments. Their 127.0.0.1 may not point to the Windows host endpoint, so do not copy the address without checking.
  • SOCKS endpoint: Use the relevant options only after confirming that the port supports SOCKS5. In curl, socks5h:// sends the destination hostname to the proxy for resolution; do not use it with an HTTP-only port.

Clear the session variables after testing

Remove-Item Env:HTTP_PROXY, Env:HTTPS_PROXY, Env:ALL_PROXY, Env:NO_PROXY -ErrorAction SilentlyContinue

Record the original values before clearing them, and restore the previous configuration if the computer already had proxy environment settings. In particular, do not rush to set test variables at the system level: after v2rayN exits and the local port closes, programs that inherit those variables may keep failing to connect.

Which layer should you fix based on the error?

Interpret errors in context. A “timeout” can occur while the terminal connects to the local endpoint, while the core connects to a remote server, or while the remote server accesses the destination site. The examples below show the actual error phrases; versions may add an address, port, or elapsed time.

Error: curl: (7) Failed to connect

Cause: The connection could not be established. In an explicit proxy test, if the address shown is local, the endpoint is usually not listening or the port is wrong. Fix: Check the address in curl's output, verify the port and process with a listener check, then restart the core.

Error: curl: (5) Could not resolve proxy

Cause: The proxy hostname could not be resolved, often because a proxy variable is misspelled. Fix: Check the variables with Get-ChildItem Env:*proxy*, set the confirmed local endpoint, and try again.

Error: curl: (28) Connection timed out

Cause: The connection exceeded its time limit; this message alone does not prove the node is down. Fix: First use verbose output to identify where it stalls, then compare the core logs from the same time and check the remote connection and routing result.

Error: ERR_PROXY_CONNECTION_FAILED

Cause: The browser could not connect to the configured proxy. Fix: Check Windows proxy settings and extensions for an outdated port. Once the core has started successfully, reopen the browser. Do not start by changing the website's DNS.

When does TUN mode make things easier?

TUN is worth considering when several apps ignore the system proxy and are difficult to configure individually. It captures traffic through a virtual interface and routes, but still depends on the core, DNS policy, and exclusion rules. It does not send all traffic through a remote node unconditionally.

  • Establish a baseline first: Confirm that an explicit HTTP proxy test succeeds, and note the current node and routing settings before enabling TUN. Otherwise, endpoint issues and virtual network adapter issues become entangled.
  • Grant permissions when prompted: Enable TUN from the v2rayN main window. If administrator access is requested, restart as prompted; then check the initialization logs for the virtual interface, routes, and DNS.
  • Avoid configuring multiple proxy paths: For the first comparison test, clear the terminal proxy variables and set “System Proxy” to “Clear system proxy” to test TUN on its own. Do not change multiple endpoints at once.
  • Keep work networks accessible: Test access to local network devices and internal company domains. If TUN conflicts with another virtual network adapter or work network, turn TUN off to restore connectivity before adjusting exclusions.

Choose the right approach: use options for one tool, consider TUN for multiple apps

If only one command fails, configure the proxy in that tool first. Consider TUN when multiple apps need to be routed. TUN can save you from configuring endpoints one by one, but it cannot fix incorrect node settings or an unreachable server.

Common questions: Why do results differ even when the proxy is on?

The browser works, but PowerShell still cannot connect. Why?

First run curl.exe with the --proxy option. If it succeeds, set proxy variables for the current terminal. If only one tool fails, check its own proxy settings rather than changing nodes.

The logs show a request, so why hasn't my exit IP changed?

Check the outbound tag for that request. A direct or other direct outbound means the endpoint is working; adjust the destination domain's routing rules and their order instead of repeatedly toggling the system proxy.

The browser stops working after I close v2rayN. Why?

Before exiting, select “System Proxy” → “Clear system proxy” from the tray menu. If the program is already closed, open Windows “Settings” → “Network & Internet” → “Proxy” and restore the previous settings. Also check for a leftover automatic setup script.

Should I use a netsh proxy import command?

Do not treat it as a general-purpose fix. The WinHTTP proxy is not the same as the system proxy configuration commonly used by browsers. Check WinHTTP proxy settings only after confirming that the target service uses WinHTTP, so you do not affect other system services.

Base your final diagnosis on three observable facts: whether the app connects to the local endpoint, whether the core receives the request, and which outbound the request selects. Gathering evidence in that order is more effective than reinstalling the client or changing DNS at random. For a refresher on importing a subscription and setting up the proxy, read the Quick Start Guide.

Download v2rayN