For v2rayN users on Windows whose browser can reach a site but commands in PowerShell time out. First, check which proxy settings the browser follows. Then point curl directly at the local proxy, and finally test the environment variables against the same URL. Change one thing at a time to tell whether the app is bypassing the proxy, the port or protocol is wrong, or the request reached the core but took an unexpected outbound route.
Check Windows proxy settings and browser behavior first
A webpage loading in your browser only confirms that this particular request succeeded. The system proxy may be working, a browser extension may be using its own proxy, or the site may be reachable without a proxy. v2rayN's system proxy settings tell apps that follow Windows settings where to send requests; routing rules determine which outbound route requests entering the core use. Switching to global routing won't make terminal apps use a proxy if they aren't configured to connect to one.
- From the v2rayN tray menu, open System Proxy and select Auto configure system proxy. Then go to Windows Settings → Network & internet → Proxy. If you're using manual proxy settings, check the toggle, address, and port under Manual proxy setup, and make sure they point to v2rayN's current local HTTP or mixed inbound. Don't rely on the tray icon alone.
- Temporarily disable browser extensions that can change proxy settings, then confirm the browser follows the system proxy. In Developer Tools, disable the cache in the Network panel and retry the same test URL. If the result changes when the extension is disabled, check its selected proxy and bypass list. If the Windows proxy settings keep reverting, check whether another proxy tool or organizational policy is managing them.
- Once the browser test succeeds, don't change nodes. Keep the current node and routing settings, and run an explicit proxy test from the terminal. Otherwise, even if terminal access starts working, you won't know whether the proxy setup was fixed or you simply switched to an outbound route that can reach the site.
Check the local port and use curl to test direct and proxied connections separately
In v2rayN, open Settings → Parameter settings and check the local inbound settings. Use the core startup log to verify the actual listening address, port, and protocol. The field names vary by version: the example below uses 10808 for a mixed inbound, but not every installation uses this port. Older configurations often use 10809 for a separate HTTP inbound; don't infer the protocol from the port number alone.
Run these commands in PowerShell. Replace both port numbers with the port your inbound actually listens on; both curl commands use the same target. The explicit curl.exe avoids having older versions of Windows PowerShell interpret curl as an alias. Putting -q first prevents curl's own config file from affecting the comparison.
Test-NetConnection -ComputerName 127.0.0.1 -Port 10808
curl.exe -q -v -I --connect-timeout 8 --max-time 20 --noproxy "*" https://example.com/
curl.exe -q -v -I --connect-timeout 8 --max-time 20 --noproxy "never-match.invalid" --proxy http://127.0.0.1:10808 https://example.com/
TcpTestSucceeded : Trueonly means that something on your machine accepted the TCP connection; it doesn't prove that the listener is the core used by v2rayN. If the log reports that the port is already in use, runGet-NetTCPConnection -LocalPort 10808 -State Listenand checkOwningProcess. Verify the process before deciding whether to change the port.- The first curl command bypasses application-level proxies. The second explicitly uses the local HTTP proxy and overrides any existing
NO_PROXYvalue with a bypass entry that won't match the target. If TUN is enabled, it may still intercept the first request. For a clean comparison, temporarily turn off TUN in an environment where you're allowed to do so, but leave the core running. - For the explicit proxy test, first check the verbose output for a connection to
127.0.0.1:10808. Then check whether curl sent aCONNECTrequest for the target, established the tunnel, and received a response. Even if both commands succeed, the test is still useful: verbose output shows whether the terminal used the local proxy, while core logs can confirm whether the outbound connection was direct or proxied.
Once the explicit proxy test works, check the terminal's environment variables
A terminal launches commands; whether they read system proxy settings or recognize particular environment variables depends on the app. In a new, separate PowerShell process, first run Get-ChildItem Env:*proxy* to check for stale ports and bypass entries. The test below only changes the current process and its child processes. Note the original values, and don't save temporary test settings to your user or system environment variables.
$env:HTTPS_PROXY = 'http://127.0.0.1:10808'
Remove-Item Env:NO_PROXY -ErrorAction SilentlyContinue
curl.exe -q -v -I --connect-timeout 8 --max-time 20 https://example.com/
This time, don't pass --proxy. If the verbose output shows curl using HTTPS_PROXY and connecting to the local port, you've verified this environment-variable proxy path. Here, https:// is the target URL's scheme, while http:// in the variable value is the protocol used to talk to the local proxy; they don't have to match. When you're done, close the temporary window or restore the original values.
- A successful HTTPS test doesn't mean HTTP requests will use the same variable. Check the documentation for the app that's failing: curl reads lowercase
http_proxyfor HTTP URLs and can readHTTPS_PROXYfor HTTPS URLs. Other apps may prioritize their own proxy options or configuration files. - If only one domain bypasses the proxy, check whether
NO_PROXYcontains its hostname, a domain suffix, or*. Once you find the cause, change only the entry that's matching incorrectly, and keep bypass entries needed for local services or your intranet. - If PowerShell works but an editor's integrated terminal doesn't, launch the app from a process where the variables are set, or restart the editor that hosts the terminal. Then check which variables the child process sees. Opening another terminal tab may not refresh the parent process's environment.
Use the point of failure to diagnose the port, protocol, and outbound route
First check whether the error occurs before connecting to the local port or after sending CONNECT to the proxy. These are examples of English errors curl may print in each scenario; the exact wording and details vary by version and configuration.
curl: (7) Failed to connect to 127.0.0.1 port 10808: Connection refused
Cause: Your machine refused the connection to that address and port. Common causes include a stopped core, the wrong port, or a different listening address. Fix: Check the core startup log and the Test-NetConnection result. Point curl at the local inbound that's actually listening, then test again.
curl: (56) CONNECT tunnel failed, response 502
Cause: The HTTP proxy responded but couldn't establish a tunnel to the target. The status code alone doesn't tell you whether name resolution or the upstream connection failed. Fix: Confirm that the proxy port in the verbose output belongs to the expected core. Match the request time to the core logs, then check the outbound route selected for the target domain, the DNS result, and the upstream connection.
curl: (60) SSL certificate problem: unable to get local issuer certificate
Cause: curl can't verify the peer's certificate chain with its current trust settings. Fix: Identify which TLS connection failed, then check the certificate trust settings in use and the server's certificate chain. On a managed network, follow your organization's instructions for trusted certificates; don't disable certificate verification.
Terminal proxy troubleshooting FAQ
The local port accepts connections. Why does the HTTP proxy test still fail?
Check which protocol the port supports. If it's a SOCKS-only inbound, change the proxy address in the explicit test to socks5h://127.0.0.1:10808 and use the actual SOCKS listening port. socks5h sends domain names to the proxy for resolution. Don't enter a SOCKS-only port in Windows manual HTTP proxy settings.
curl connects to the local proxy. Why do the logs still show a direct connection?
Local proxy access and the remote outbound route are separate. Check v2rayN's current routing rules in order to see whether a direct rule matches the test domain first. Rerun the same explicit proxy command and compare its timestamp with the corresponding logs. Don't use other requests made by the browser to infer where curl's request went.
Does enabling TUN mean I can ignore terminal proxy variables?
TUN can capture matching traffic at the network layer, but an app's explicit proxy settings, routing, and exclusions can still affect the result. To debug a single command, start with an explicit proxy test. If an app that ignores proxy settings needs to be covered, test TUN separately. Don't change TUN, system proxy settings, and routing rules all at once.
What should I include when sharing logs for help?
Include the v2rayN version, local inbound type and port, test time, error code, and whether the connection to the local proxy succeeded. Also mention whether the browser has a proxy extension enabled and whether the terminal inherits environment variables. Before sharing logs, redact subscription URLs, node credentials, and authentication details in request headers.