Oct 21, 2026 · Troubleshooting · About 8 min read

V2Ray System Proxy Not Working? Troubleshoot Browser and Terminal Issues

Does your browser work through the proxy while terminal commands fail, or the other way around? Troubleshoot browser extensions and PAC settings separately from terminal environment variables and local proxy ports.

At a glance

When browser and command-line results differ on desktop, first use curl to connect explicitly to v2rayN's local proxy. Then check where the browser gets its proxy settings and which environment variables the terminal process received. This helps distinguish between an app not using the proxy, an unreachable local port, and a failed outbound connection after the request reaches the core.

Check the local proxy endpoint first

A system proxy does not route all traffic automatically. It provides proxy settings that only affect apps that read and use them. A browser may use the operating system's settings or its own proxy configuration; command-line tools may rely on arguments, environment variables, or their own config files. Check v2rayN's system proxy status separately from the core's listening status: a proxy address in system settings does not mean a service is listening on that port.

App requestProxy selectionLocal listenerRoute matchingDestination

In v2rayN, go to Settings → Parameter Settings to check the local listener fields, then review the core startup logs. The following are example configurations, not claims about the defaults in the current version. With a mixed listener, HTTP and SOCKS requests may share a port. With separate listeners, use the port for the actual protocol; don't assume ports are interchangeable just because their numbers are similar.

10809
Example HTTP listening port
10808
Example SOCKS listening port

Use the HTTP listener for a baseline request. Replace the example port with the one in your setup. In Windows PowerShell, run curl.exe to avoid invoking the alias with the same name. Use the same destination for subsequent tests and note the request time so you can match it to the client logs.

curl -v --max-time 15 --noproxy "" --proxy http://127.0.0.1:10809 https://example.com/

--noproxy "" excludes any existing bypass list from this test. In verbose output, Connected to 127.0.0.1 only means curl connected to the local port. Next, check whether CONNECT succeeded and whether the destination returned a response. Even a response from the destination does not prove the request was routed through a remote node: the core may still have selected a direct route.

Browser proxy not working: check extensions and PAC

If an explicit proxy request succeeds but the browser fails, first find out which proxy settings the browser is actually using. An extension, the browser's own settings, and system settings may all be in play. Change one thing at a time; otherwise, even if access starts working, it will be hard to tell which setting fixed it.

  1. Identify the proxy settings in use

    On Windows, go to Settings → Network & Internet → Proxy and check the setup script and manual proxy settings separately. In Firefox, go to Settings → General → Network Settings → Settings and check whether it is set to use the system proxy, a manual proxy configuration, or an automatic configuration URL.

  2. Isolate proxy extensions

    In a browser profile you control, temporarily disable extensions that manage proxy settings or switch rules, then try the same destination again. A private window isn't proof that extensions are isolated, since some can be allowed to run there. Ask your administrator to review settings managed by organizational policies.

  3. Check PAC rules

    If you're using an automatic configuration script, check that it loads, then verify whether the destination domain matches a proxy rule or DIRECT. The latter tells the browser to connect directly. If the script returns a proxy entry, confirm its address and port still match the local listener.

  4. Retest the same destination

    Close existing tabs and make a new request, then compare its time and destination against the available client access logs. If only one domain fails, check its bypass list or PAC match conditions first; don't mistake a domain-specific rule for a system-wide proxy failure.

PAC rules and client routing rules act at different points. If PAC returns a direct connection, the request typically never reaches the local proxy. If client routing selects a direct connection, the request has already reached the core, but its outbound route doesn't use a node. To identify which layer made the choice, check the browser's proxy settings and the outbound result in the client logs, not just whether the page loads.

Terminal proxy not working: check environment variables and protocols

If the browser works but curl doesn't, compare an explicit proxy request with a regular request in the same terminal. If only the explicit request works, you usually don't need to change the local listener; first check whether the current process received the proxy settings. The desktop proxy toggle does not automatically set environment variables for every shell. Processes launched from an editor, terminal, or service may inherit different environments.

SettingWhat it does in curlWhat to check
http_proxySets a proxy for HTTP destinationsUse lowercase in case-sensitive environments; curl does not accept uppercase HTTP_PROXY
https_proxySets a proxy for HTTPS destinationsThe variable name indicates the destination protocol; the value prefix indicates the protocol used to connect to the proxy
all_proxyFallback proxy when no matching protocol-specific variable is setCheck whether it still points to a retired port
no_proxyLists destinations that bypass the proxyCheck whether the test domain or a wildcard is forcing a direct connection

For example, if the local endpoint is a plain HTTP proxy, https_proxy can be set to http://127.0.0.1:10809 even when the destination uses HTTPS. curl sends CONNECT to the HTTP proxy, then establishes a TLS connection to the destination through the tunnel. Don't change the local proxy URL to HTTPS just because the destination URL starts with HTTPS.

# macOS, Linux: apply the variables to this curl command only
https_proxy=http://127.0.0.1:10809 curl -v --noproxy "" https://example.com/

# Windows PowerShell: list proxy variables in the current session
Get-ChildItem Env: | Where-Object Name -Match '^(http|https|all|no)_proxy$'

Bottom line: fix the scope first, then make the setting persistent

Once a one-time variable test succeeds, add the verified settings to the environment used to launch the tool. A setting that works only in an interactive terminal won't necessarily apply to a background task or an editor's integrated terminal.

For a SOCKS endpoint, replace the proxy argument in the baseline command with --proxy socks5h://127.0.0.1:10808. In curl, socks5h sends the destination hostname to the proxy for resolution, while socks5 resolves it locally. Different results mean you should check where resolution happens and the proxy's DNS settings; they don't by themselves prove that a DNS service is at fault.

Use the error to identify where the request failed

Start with the first error and the connection target immediately before it. The same timeout message can occur while connecting to the local port, waiting for the proxy to establish a tunnel, or waiting for the destination to respond. Compare verbose output with core logs from the same time; this narrows things down more effectively than repeatedly switching nodes.

Connection refused

Cause and fix: If the connection to 127.0.0.1 is refused, first check whether the core is listening on that port. Review the startup logs and listening address. In particular, if the command is running in a virtual machine or container, its loopback address usually isn't the desktop host's loopback address.

Could not resolve proxy

Cause and fix: curl can't resolve the hostname in the proxy address; this isn't a failure to resolve the destination website. Check whether a proxy variable still contains an old hostname. If the core is listening on the IPv4 loopback address in the same network environment, retry with 127.0.0.1 and the actual port.

CONNECT tunnel failed, response 502

Cause and fix: The HTTP proxy responded to CONNECT with a 502, so the tunnel wasn't established. First confirm that the listening process is the expected core, then check the outbound route, destination resolution, and connection logs for that request. The status code alone doesn't tell you which step failed.

Retest and restore your settings

If neither app can complete a request with an explicit proxy, return to connection troubleshooting to check the core and outbound route. If the request reaches the core but direct and proxy routes behave unexpectedly, see the routing guide. When sharing troubleshooting details, include the port type, the stage where the error occurred, and relevant log excerpts. Remove subscription URLs, credentials, and any request data that doesn't need to be public.

Download and install a client