Node HandbookNODE HANDBOOK
Transport

v2rayN: connection reset by peer

A reset is not a failed connection. The three-way handshake completed, data started to flow, and then a RST arrived. That single ordering fact removes DNS, wrong ports, and dead hosts from the list of suspects.

Last updated: 2026-11-24 · Every error string on this page was reproduced on a real client.

Reset versus refused versus timeout

These three words are often used interchangeably and they describe three different failures at three different layers. The distinction is the whole diagnosis.

MessageHandshakeWhat it eliminates
connection refusedNever completed — SYN was answered with RSTNothing on that port is listening
connection reset by peerCompleted, then torn downHost reachable, port open, something accepted the connection
i/o timeoutNo reply at allNothing is known about the far end

With a reset, the address is correct, the port is open, and a process accepted the connection. What failed is everything after that. The remaining candidates are the TLS or protocol handshake, an interception device, or a server-side policy.

Cause one: interception after the ClientHello

This is the most common cause for proxies that worked yesterday. The pattern is precise: TCP connects, the client sends its TLS ClientHello containing the SNI, and the RST arrives before the server's ServerHello. The reset is injected by something on the path that read the server name and decided to end the session.

The tell is timing. A reset that arrives within milliseconds of the ClientHello, before any server response could plausibly return, is not the server's doing — the round trip alone rules it out. A reset that arrives after a full round trip can be either.

Two ways to confirm without guessing:

openssl s_client -connect host:443 -servername your.sni -brief

If the reset lands during the handshake, the interception is between you and the server. Run the same command against a different port or with the SNI omitted — if the reset disappears without the name, the name is what triggered it. That is the signature of name-based blocking, and the fix is a transport that does not present a blockable name in the clear, not a different node on the same address.

Cause two: the server rejected the session

If the reset arrives after a proper round trip and the server is yours, look at its log at that timestamp. Typical server-side reasons:

  • UUID or password rejected, and the server is configured to close hard rather than drop silently
  • TLS handshake failed because the certificate or the ALPN did not match what the server expects
  • WebSocket path wrong, and the front-end web server terminates with a reset instead of a 404
  • A connection limit or rate limiter on the provider's side kicked in

The last one has a distinctive look: it happens after a period of successful use, on all nodes at once, and clears by itself. Compare against your own usage rather than against the node's configuration.

Cause three: the fallback or front-end is misconfigured

When a CDN or a web server sits in front of the proxy, it makes its own decision about the request. A path that does not match any route, a host header it does not serve, or a TLS version it refuses can all end in a reset. This is distinguishable from interception because it is reproducible from any network, including from the server itself:

curl -v --resolve your.host:443:127.0.0.1 https://your.host/your/path

If that also resets, the problem is local to the deployment. If it succeeds locally and fails from your machine, the path is involved.

Cause four: long-lived connection cut

A reset that appears after a fixed interval of idle time — commonly 60 to 300 seconds — is an idle timeout, not an error. Some middleboxes and some providers drop flows that have been silent for too long. The symptom is not a failed connection but a connection that dies while you are reading a page and recovers on refresh. Nothing is misconfigured; the transport needs keepalive.

Narrowing it in four steps

  1. Time the reset relative to the ClientHello. Sub-round-trip means interception; after a round trip means server or front-end.
  2. Repeat with the SNI removed. If the reset disappears, the name is the trigger.
  3. Repeat from the server against itself. If it resets there too, the deployment is at fault, not the path.
  4. Repeat after a period of idle. If it only happens then, it is a timeout and needs keepalive, not repair.

Each step removes a layer, and the answer is whichever step first changes the outcome.

Frequently asked

Does reset by peer mean the node is offline?

No. The node accepted a connection, so it is online. Something ended the session afterwards, which is a different problem from an unreachable host.

Why does it work on mobile data but reset on home broadband?

Because the interception point is on one path. A reset that appears on one network and not another is strong evidence of a device or policy in that network, not of a node fault.

Can I just retry until it works?

For a rate limiter, sometimes. For name-based interception, retrying produces the same reset every time and adds connection attempts to the pattern being matched. Change the transport instead.

Is a reset during TLS always interception?

Not always, but it is the leading candidate when it arrives faster than a round trip allows. Confirm by repeating without the server name.

What if the reset happens after a few minutes of use?

That is an idle timeout rather than a rejection. Enable keepalive on the transport before changing any credential.