Debug your connection.

/nw is a command-line tool that tests how your network reaches a site or server, one layer at a time. It tells you what the results show and what they do not prove. It runs on your machine and uploads nothing.

$ nw diagnose example.com

Summary
  dns   ok
  tcp   ok
  tls   ok
  http  ok

No actionable findings.

ok    dns   example.com via system  24.1 ms
ok    tcp   203.0.113.10:443  11.8 ms
ok    tcp   [2001:db8::10]:443  12.6 ms
ok    tls   203.0.113.10:443  39.4 ms
ok    tls   [2001:db8::10]:443  41.0 ms
ok    http  https://example.com/ (ipv4)  96.7 ms
ok    http  https://example.com/ (ipv6)  98.2 ms
$ 

example output

$ curl -fsSL https://nwrk.ir/install.sh | sh

Signed releases start at v0.1.0. Until then, use Go.

Install guide Source on GitHub

Every layer, in order

/nw tests DNS, TCP, TLS and HTTP in that order. If one layer fails, it skips the layers after it and tells you why. You see where the connection breaks, not just a generic error.

  1. your machine

    Starting point. Nothing is sent until the first layer runs.

    +0 ms
  2. dns ok

    Asks the system resolver, and any resolver you choose, for A and AAAA records.

    +24 ms
  3. tcp ok

    Connects to each address. IPv4 and IPv6 are tested separately.

    +36 ms
  4. tls FAIL

    Checks the certificate chain and the server name. Certificate checks are always on.

    tls.cert_expired
    +78 ms
  5. http skipped

    Sends one request with a time limit and times each stage.

     
  6. example.com
     

Commands for common network problems

Start with the question you have. Each command answers one.

A site won't load. Where does it break?

$ nw diagnose example.com

Tests DNS, TCP, TLS and HTTP in order and names the layer that failed.

Is it my network, my country or the site?

$ nw doctor --region ir

Checks this machine first, then reference sites for a region. Tells you whether the problem is local, in your country or international.

Is something on the path tampering with my connection?

$ nw security interference example.com

Compares resolvers, TLS handshakes by server name, and http with https. Lists other possible causes for each difference.

Is my DNS server the problem?

$ nw test dns example.com --resolver tls://9.9.9.9

Runs a single measurement. A resolver can be plain, tcp://, tls:// or https://.

Where do my packets stop?

$ nw path trace example.com

Ping, trace and MTU hints. Uses ICMP where allowed and TCP where not.

How does this machine connect?

$ nw network show

Lists your interfaces, routes, DNS servers and proxies. Sends nothing.

Every command and flag

Evidence, not guesses

From one machine, a timeout and a block can look identical. /nw reports what it measured, what could explain it, and what it did not check.

finding
What was observed, such as tls.cert_expired. The same measurements always give the same finding.
hypothesis
A possible explanation, such as an expired certificate or a wrong clock on your machine. It is labeled as a possibility, never as a conclusion.
not observed
Every hypothesis lists what was not checked, so you know what to test next.
confidence
One measurement is never enough for high confidence.

How findings are made

What /nw will not do

Everything runs on your machine. These limits are fixed, not settings.

  • Upload anything. There is no account, no server and no telemetry.
  • Skip certificate checks, or record cookies, page bodies or credentials.
  • Change your system. It does not touch DNS settings, proxies, firewall rules or routes.

Read the privacy notes