V2Ray System Proxy Not Working: Why Browsers Use the Proxy but Terminals Don’t

Troubleshoot browser and terminal proxy settings separately: check browser extensions and overrides, set the http_proxy environment variable for your terminal, then verify each step with commands.

At a glance

For users who have selected a server in v2rayN but find that the browser works while terminal requests time out—or the other way around. First test the local proxy endpoint with an explicit proxy command, then check the browser’s proxy source and the terminal’s environment variables separately. Finally, use routing details and logs to narrow down the cause. The examples use local mixed port 10808; replace it with the port shown by your client before running them.

1. The system proxy setting doesn’t handle every connection

When you choose “Set system proxy” in v2rayN, it writes the local proxy address to the relevant operating system settings. Whether an app uses those settings is up to the app. Browsers commonly read the system proxy, while many command-line tools rely on environment variables or their own config files. So if a browser can reach a URL, that doesn’t mean your terminal is using the proxy.

App reads proxy settings Connects to local port Core applies routing rules Selects an outbound Reaches the destination

There are three separate steps in this chain: whether the app uses a proxy, whether the local port accepts requests, and which outbound the core selects. V2Ray or Xray handles traffic in the core; v2rayN manages the desktop configuration. VMess and VLESS are server connection protocols, not proxy types to enter in a browser.

Entry pointTypically used byWhat to check
System proxyApps that read system settingsManual proxy, auto-config scripts, bypass lists
Environment variablesCommand-line tools such as curlVariable names, protocol prefix, and whether the current process inherits them
App-specific settingsBrowser extensions and developer toolsWhether they override system settings or environment variables
TUN modeTraffic routed through a virtual network adapterSystem routes, DNS, and exclusion rules

This guide first isolates app-level proxy settings; enabling TUN isn’t the first step. If TUN is already on, it may also capture direct-connection tests. To tell the two entry points apart, note your current settings, then temporarily turn off TUN for comparison.

2. Check v2rayN’s listening port, then test with an explicit proxy

Check the local port shown on the v2rayN main screen, then verify the listening settings under “Settings” → “Parameter settings.” Field names and defaults can vary by version, so don’t assume an HTTP port is always 10809 based on an older guide. The example below assumes 127.0.0.1:10808 is a mixed entry point that supports HTTP. If your entry point supports SOCKS only, use the SOCKS command later in this guide.

127.0.0.1
Loopback address on this computer
10808
Example mixed port used in this guide
10 sec
Example connection timeout limit
  1. Confirm the core is running

    Select the server you want to use on the main screen and check the logs for startup failures or port conflicts. Updating a subscription refreshes server details; it doesn’t confirm that a connection has been established.

  2. Check the local port

    Open “Settings” → “Parameter settings” and note the actual listening port and supported entry type. After saving changes, confirm that the core has reloaded its configuration.

  3. Check that the port is listening

    Run the command below in Windows PowerShell. If nothing is listening, fix the core startup issue before changing browser settings.

  4. Specify the proxy explicitly

    Use curl’s --proxy option to specify the entry point directly. This removes the uncertainty around which proxy settings the tool reads.

# Windows PowerShell
Get-NetTCPConnection -State Listen -LocalPort 10808

curl.exe -v --connect-timeout 10 --max-time 25 --proxy http://127.0.0.1:10808 --noproxy "localhost,127.0.0.1" https://example.com/ -o NUL

On Windows, use curl.exe so older versions of Windows PowerShell don’t interpret curl as a different command. On Linux and macOS, use curl and replace the output target NUL with /dev/null. The example bypass list includes only local addresses, so an existing NO_PROXY setting won’t cause the destination URL to bypass the proxy.

Bottom line: Once explicit proxying works, adjust the app settings

If the log shows curl connecting to local port 10808 and receiving a response from the destination site, check the terminal variables or browser overrides first. If the local port connection itself fails, fix the listening address, port, or core startup. A webpage’s status code alone can’t confirm that traffic used the remote proxy outbound; check the core’s routing log too.

3. Browser checks: extensions, manual proxy, and auto-config

If the browser works but the terminal doesn’t, the browser may have its own proxy settings. Conversely, if curl succeeds with an explicit proxy but the browser fails, an extension may still point to an old port. Pick a fixed URL, note where the browser gets its proxy settings, then change one setting at a time so you can compare results.

An auto-config script can choose a proxy or a direct connection based on the URL, and the system bypass list may exclude certain domains. If only one site bypasses the proxy, check whether it matches one of these rules before switching servers. Browser Secure DNS settings can affect how some domains resolve, but they aren’t a proxy toggle.

4. Terminal checks: set http_proxy and https_proxy

Command-line tools usually won’t use the local proxy just because the system proxy is enabled. Set the variables temporarily in the current terminal first; if the test succeeds, you can decide whether to add them to your user configuration. The address below is for an HTTP proxy or a mixed entry point that supports HTTP. Even for an HTTPS destination, the proxy address can still use the http:// prefix.

Windows PowerShell: change the current session only

$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"

Get-ChildItem Env: | Where-Object Name -Match 'proxy'
curl.exe -v --connect-timeout 10 --max-time 25 https://example.com/ -o NUL

Setting $env: affects the current PowerShell session and any child processes started afterward; it won’t change another terminal that’s already open. To pass the variables to a development tool, launch it from this session or restart it after changing persistent environment settings.

Linux and macOS: export variables in the current shell

export http_proxy='http://127.0.0.1:10808'
export https_proxy='http://127.0.0.1:10808'
export no_proxy='localhost,127.0.0.1'

env | grep -i proxy
curl -v --connect-timeout 10 --max-time 25 https://example.com/ -o /dev/null

Here, 127.0.0.1 must be in the same network environment as v2rayN. In containers, remote SSH sessions, and some virtualized environments, the loopback address points to that environment itself—not your desktop computer. Don’t copy the address as-is, and don’t expose the proxy port to the public internet just to troubleshoot.

5. Tell HTTP, SOCKS, and DNS issues apart

If the entry point supports SOCKS5 only, using it as an HTTP proxy may result in a connection reset or protocol error. Check the local entry type first, then use the matching command. The socks5h option below sends the destination hostname to the proxy for resolution; with plain socks5, curl usually resolves the hostname locally.

# Windows: use the SOCKS5 entry point and resolve the destination hostname through the proxy
curl.exe -v --connect-timeout 10 --max-time 25 --proxy socks5h://127.0.0.1:10808 --noproxy "localhost,127.0.0.1" https://example.com/ -o NUL

# Linux / macOS
curl -v --connect-timeout 10 --max-time 25 --proxy socks5h://127.0.0.1:10808 --noproxy "localhost,127.0.0.1" https://example.com/ -o /dev/null

Error: curl: (7) Failed to connect

Cause: Common causes include no listener on the local port, an incorrect address, or the request running in a different network environment. Fix: Check the listener first, then make sure the loopback address in the command points to the computer running v2rayN.

Error: curl: (5) Could not resolve proxy

Cause: The proxy server address can’t be resolved, or the address in an environment variable is malformed. Fix: Check for extra characters in the variable. For local testing, use the full address http://127.0.0.1:10808.

Error: curl: (6) Could not resolve host

Cause: The destination hostname can’t be resolved along the current request path. The request may be going direct, or SOCKS may be resolving the hostname locally. Fix: Check the verbose output to see whether a proxy is in use, compare with a socks5h test, and review the core’s DNS logs.

Error: curl: (60) SSL certificate problem

Cause: TLS certificate verification failed, possibly because of the system clock, trusted certificates, or certificate substitution on the network. Fix: Correct the system time and check the certificate chain. Don’t treat permanently disabling certificate verification as a proxy fix.

The end of an error line usually includes the destination address and a more specific cause; keep the full context. If an HTTP proxy returns 200 Connection established, that only confirms the CONNECT tunnel was established. The subsequent TLS handshake or destination request may still fail.

6. After the request reaches the core, check routing and server outbound

A connection to the local entry point doesn’t guarantee the request will go through a remote server. v2rayN routing rules can send some domains or IPs direct. Browsers and terminals may also request different domains, address families, or redirect destinations. Use the exact same URL when comparing results.

ResultCheck firstNext step
Explicit proxy works, regular curl failsEnvironment variables and bypass listPrint the current session variables and check no_proxy and app settings
curl works, browser failsBrowser-specific proxy settingsDisable proxy extensions; check system mode and manual port
Entry logged, outbound connection times outServer reachability and connection settingsCheck the server address, port, transport settings, and remote service status
Request uses a direct outboundRouting matchCheck domain or IP rules and their order
No listener on the local portCore startup and port conflictsReview startup logs and fix configuration or listener conflicts

You can temporarily increase the log level during testing, but keep it elevated only as long as needed. Before sharing logs, remove sensitive details such as subscription URLs, user identifiers, and visited domains. If logs clearly show a remote handshake or authentication failure, check the VMess, VLESS, or other server settings. That’s separate from whether the terminal reads the system proxy.

Bottom line: Confirm both the entry point and outbound

Keep the verbose curl output and core log for the same request. Confirm both which local port it connected to and which outbound it matched. Once both are clear, determine whether the issue is with app settings, DNS, routing, or the server. Don’t keep changing settings based only on a change in your apparent IP address.

7. Restore temporary settings after testing

Temporary environment variables can remain in the terminal, causing command-line tools to keep trying a port that’s no longer open after you exit v2rayN. If you created these variables for this test, remove them using the commands below. If you already had settings for a corporate proxy or development environment, restore the values you noted earlier instead of clearing them.

# Windows PowerShell: remove temporary variables from the current session
Remove-Item Env:http_proxy, Env:https_proxy, Env:no_proxy -ErrorAction SilentlyContinue

# Linux / macOS: remove temporary variables from the current shell
unset http_proxy https_proxy no_proxy

Choose a client for your platform

Choose a client for your device’s operating system; use v2rayN on desktop. After installation, confirm the actual listening port, then test your browser and terminal separately as described here. For first-time setup, start with the quick-start guide.

Download v2rayNChoose a client for your operating system