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.
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 point | Typically used by | What to check |
|---|---|---|
| System proxy | Apps that read system settings | Manual proxy, auto-config scripts, bypass lists |
| Environment variables | Command-line tools such as curl | Variable names, protocol prefix, and whether the current process inherits them |
| App-specific settings | Browser extensions and developer tools | Whether they override system settings or environment variables |
| TUN mode | Traffic routed through a virtual network adapter | System 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.
-
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.
-
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.
-
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.
-
Specify the proxy explicitly
Use curl’s
--proxyoption 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.
- v2rayN: In the tray menu, open “System proxy” and select “Auto-configure system proxy.” Then check the address and port actually set in the operating system. If you use an auto-config script, check its rules too.
- Windows: Go to “Settings” → “Network & internet” → “Proxy.” Check “Use setup script” and “Use a proxy server.” Note the existing settings so other networking tools don’t overwrite them without your knowledge.
- Chrome: Go to “Settings” → “System” → “Open your computer’s proxy settings” and check the system proxy. Then open “Extensions” → “Manage extensions” and temporarily disable proxy-switching extensions.
- Firefox: Go to “Settings” → “General” → “Network Settings” → “Settings.” Check whether “Use system proxy settings” or “Manual proxy configuration” is selected. A stale port in manual mode won’t update when the system proxy changes.
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
https_proxyselects a proxy for HTTPS destinations; it doesn’t mean the proxy entry point must use TLS. Usinghttps://127.0.0.1:10808for a regular HTTP entry point can cause a handshake error.- curl uses lowercase
http_proxyfor HTTP proxy settings; don’t set only uppercaseHTTP_PROXY. In case-sensitive environments, remove duplicate variables with conflicting values too. - If the destination matches
no_proxyorNO_PROXY, it bypasses the proxy. In particular, check for*, which may send all destinations directly. - Apps launched from a graphical desktop, administrator processes, and background services may not inherit the current shell’s variables. Some tools also have their own proxy settings; check the precedence rules for the tool you’re using.
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.
| Result | Check first | Next step |
|---|---|---|
| Explicit proxy works, regular curl fails | Environment variables and bypass list | Print the current session variables and check no_proxy and app settings |
| curl works, browser fails | Browser-specific proxy settings | Disable proxy extensions; check system mode and manual port |
| Entry logged, outbound connection times out | Server reachability and connection settings | Check the server address, port, transport settings, and remote service status |
| Request uses a direct outbound | Routing match | Check domain or IP rules and their order |
| No listener on the local port | Core startup and port conflicts | Review 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
- Retest the same URL in your browser and terminal to confirm the results are as expected.
- Re-enable any extensions, TUN, or auto-config scripts paused for testing. Restore them one at a time and check whether the issue returns.
- If you need to use a proxy long-term, add the verified settings to the relevant user environment or app configuration, and note the port.
- When you change the local listening port, update the environment variables and any manual browser proxy settings too, so stale settings don’t remain in effect.
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.