{"id":37113782,"url":"https://github.com/djian01/nt","last_synced_at":"2026-01-14T13:24:53.238Z","repository":{"id":257539721,"uuid":"847618630","full_name":"djian01/nt","owner":"djian01","description":"A versatile network testing tool that supports ICMP, HTTP(s), DNS, TCP, and MTU testing ","archived":false,"fork":false,"pushed_at":"2025-10-22T01:06:51.000Z","size":6130,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T03:10:34.637Z","etag":null,"topics":["dns","http","icmp","mtu","network","network-analysis","network-monitoring","tcp","test","test-automation","testing","tests"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djian01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-26T08:04:49.000Z","updated_at":"2025-09-19T10:52:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"e00734a0-3b2e-49f5-a1a3-f289be60e687","html_url":"https://github.com/djian01/nt","commit_stats":null,"previous_names":["djian01/nt"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/djian01/nt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djian01%2Fnt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djian01%2Fnt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djian01%2Fnt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djian01%2Fnt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djian01","download_url":"https://codeload.github.com/djian01/nt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djian01%2Fnt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28421156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","http","icmp","mtu","network","network-analysis","network-monitoring","tcp","test","test-automation","testing","tests"],"created_at":"2026-01-14T13:24:52.666Z","updated_at":"2026-01-14T13:24:53.223Z","avatar_url":"https://github.com/djian01.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nt (Net Test) - A versatile network testing tool that supports ICMP, HTTP(s), DNS, TCP, and MTU testing\n\n`nt` is a versatile tool for network troubleshooting and testing written in Go. It provides continuous testing of network connectivity using various protocols using subcommands, including `icmp`, `tcp`, `http`, and `dns`. Monitor round-trip times (RTT), track packet loss rates, and log high latency events with timestamps to ensure your network's reliability.\n\n## Table of Contents\n- [Features](#features)\n- [Installation](#installation)\n  - [Option 1 - go install](#option-1-install-via-go-install)\n  - [Option 2 - build from source](#option-2-build-from-source)\n  - [Option 3 - Makefile](#option-3-makefile-docker--make-are-required-on-your-system)\n  - [Option 4 - Download from Release](#option-4-download-executable-from-github-releases)\n- [Usage](#usage)\n  - [Main Command](#main-command)\n  - [ICMP Ping Sub-Command](#icmp-sub-command-required-privilege-mode-in-linux)\n  - [TCP Ping Sub-Command](#tcp-sub-command)\n  - [HTTP Ping Sub-Command](#http-sub-command)\n  - [DNS Ping Sub-Command](#dns-sub-command)\n  - [MTU Discovery Sub-Command](#mtu-sub-command)\n  - [TCP Scan Sub-Command](#tcp-scan-sub-command)\n- [Logging and Recording](#logging-and-recording)\n- [License](#license)  \n- [Contact](#contact)  \n\n## Features\n\n- **Subcommands for Protocols**: Use specific subcommands (`icmp`, `tcp`, `http`, `dns`) to perform tests.\n- **Continuous ICMP Ping**: Monitor network latency and packet loss using ICMP echo requests.\n- **TCP Connectivity Testing**: Check the availability and response times of TCP ports.\n- **HTTP/HTTPS Testing**: Test web server availability and measure HTTP/HTTPS response times.\n- **DNS Ping**: Verify DNS server responsiveness and resolve lookup times.\n- **MTU Testing**: Determine the Maximum Transmission Unit (MTU) size to a given destination host/IP.\n- **TCP Port Testing**: Test if the remote server is listening on one or multiple given TCP ports.\n- **Recording and Logging**: Save test results to a CSV file for later analysis.\n- **Customizable Output**: Adjust the number of rows displayed in the terminal during live tests.\n- **Cross-Platform**: Compatible with Windows and Linux.\n\n\n\n## Installation\n\n### Prerequisites\n\n- For Option 1 \u0026 2, Go 1.18 or higher is required on your system.\n\n### Option 1: Install via `go install`\n\nThe compiled executable will be placed in `$GOPATH/bin`\n\n```bash\ngo install github.com/djian01/nt@latest\n```\n\n### Option 2: Build from Source\n\n```bash\ngit clone https://github.com/djian01/nt.git\ncd nt\ngo build .\n```\n### Option 3: Makefile (Docker \u0026 Make are required on your system)\n\nThe compiled executable will be placed in `\\executable\\` inside the code folder\n\n```bash\ngit clone https://github.com/djian01/nt.git\ncd nt\nmake build-linux\n```\n\nor\n\n```bash\ngit clone https://github.com/djian01/nt.git\ncd nt\nmake build-windows\n```\n\n### Option 4: Download Executable from GitHub Releases\n\n1. Visit the [Releases](https://github.com/djian01/nt/releases) page of the repository.\n2. Download the `nt_linux_amd64_x.x.x.tar.gz` file for Linux or the `nt_windows_amd64_x.x.x.zip` file for Windows\n\n## Usage\n\n### Main Command\n\n```bash\nnt [flags] \u003csub-command: icmp/tcp/http/dns/mtu/tcpscan\u003e [args]\n\n```\n\n#### Global Options\n- `-r`:   **Enable Recording**\n Save the test results to a CSV file for future analysis.\n\n- `-p \u003cnumber\u003e`:   **Rows Displayed**\n  Specify the number of rows displayed in the terminal during live tests. Default is `10`.\n\n\n\n### ICMP Sub-Command (required privilege mode in Linux)\n\n#### ICMP Options\n- `-c`:   **ICMP Ping Count**  \n  Number of ICMP ping requests to send. Default is `0`, which means it will run non-stop until interrupted with `Ctrl+C`.\n\n- `-d`:    *ICMP Ping Do Not Fragment**  \n  Sets the \"Do Not Fragment\" flag in the ICMP request. Default is `false`.\n\n- `-h`:   **Help**  \n  Display help information for the `icmp` subcommand.\n\n- `-i`:   **ICMP Ping Interval**  \n  Interval between ICMP ping requests in seconds. Default is `1` second.\n\n- `-s`:   **ICMP Ping Payload Size**  \n  Size of the ICMP ping payload in bytes. Default is `32` bytes. \n  Total IP Packet size = IP Header (20 bytes) + ICMP Header (8 bytes) + Payload Size (specificed with '-s')\n  Example: If Payload Size is 1472, the IP Packet size is 1500 bytes (20 + 8 + 1472)\n\n- `-t`:   **ICMP Ping Timeout**  \n  Timeout for each ICMP ping request in seconds. Default is `4` seconds.\n\n#### 💻 Example 1: ICMP continuous ping to \"google.com\" with recording enabled\n\n```bash\nnt -r icmp google.com\n\n```\n\n#### 💻 Example 2: ICMP ping to \"10.2.3.10\" with count: 10, interval: 2 sec,  payload 48 bytes\n\n```bash\nnt icmp -c 10 -i 2 -s 48 10.2.3.10\n\n```\n\n\n### TCP Sub-Command\n\n#### TCP Options\n- `-c`:    **TCP Ping Count**  \n  Number of TCP ping requests to send. Default is `0`, which means it will run non-stop until interrupted with `Ctrl+C`.\n\n- `-h`:   **Help**  \n  Display help information for the `tcp` subcommand.\n\n- `-i`:   **TCP Ping Interval**  \n  Interval between TCP ping requests in seconds. Default is `1` second.\n\n- `-s`:   **TCP Ping Payload Size**  \n  Size of the TCP ping payload in bytes. Default is `0` bytes (no payload).\n\n- `-t`:   **TCP Ping Timeout**  \n  Timeout for each TCP ping request in seconds. Default is `4` seconds.\n\n\n#### 💻 Example 1: TCP ping to \"google.com:443\" with recording enabled\n\n```bash\nnt -r tcp google.com 443\n\n```\n\n#### 💻 Example 2: TCP ping to \"10.2.3.10:22\" with count: 10 and interval: 2 sec\n\n```bash\nnt tcp -c 10 -i 2 10.2.3.10 22\n\n```\n\n### HTTP Sub-Command\nThe `http` subcommand allows you to perform HTTP/HTTPS probing against a target host.  \nYou can customize the HTTP method, expected status codes, and more.\n\n**Note:**  \n- If custom port is not specificed, the test will use the default ports (HTTP 80, HTTPS 443).\n- The default interval for HTTP Ping is 5 seconds.\n\n#### HTTP Options\n- `-c`:   **HTTP Ping Count**  \n  Number of HTTP ping requests to send. Default is `0`, which means it will run non-stop until interrupted with `Ctrl+C`.\n\n- `-h`:   **Help**  \n  Display help information for the `http` subcommand.\n\n- `-i`:   **HTTP Ping Interval**  \n  Interval between HTTP ping requests in seconds. Default is `5` seconds.\n\n- `-m`:   **HTTP Ping Method**  \n  HTTP request method to use (e.g., `GET`, `POST`). Default is `\"GET\"`.\n\n- `-s, --statuscode` : Expected HTTP status code(s). Accepts:  \n  - Shorthand ranges: `2xx`, `3xx`, `4xx`, `5xx`  \n  - Exact codes: `200`, `301`, `404`, etc.  \n\n- `-t`:   **HTTP Ping Timeout**  \n  Timeout for each HTTP ping request in seconds. Default is `4` seconds.\n\n- `-x, --proxy` : **HTTP or SOCKS5 Proxy**  \n  Route all HTTP/HTTPS requests through a proxy.  \n  Supported schemes:  \n  - `http://` or `https://` (standard web proxies)  \n  - `socks5://` or `socks5h://` (SOCKS proxies)  \n\n  Examples:  \n  - No authentication:  \n    ```bash\n    -x http://172.16.200.102:3128\n    ```  \n  - With authentication:  \n    ```bash\n    -x http://user01:S%40cretPass@172.16.200.102:3128\n    ```\n    **Important:** If your password contains special characters (`@`, `:`, `/`, `%`, etc.),  \n    you must **URL-encode** them. See the [URL Encoding Reference](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) for the full table of encodings.\n    Example:  \n    - Actual password: `S@cretPass`  \n    - Encoded: `S%40cretPass` (because `@` → `%40`)  \n\n#### 💻 Example 1: HTTP ping to \"https://google.com\" with recording enabled (With default values: Port-443, Method-GET, Count-0, Interval-5s, Timeout-4s)\n\n```bash\nnt -r http https://google.com\n\n```\n\n#### 💻 Example 2: HTTP ping to POST \"http://10.2.3.10:8080/token\" with count: 10 and interval: 2 sec\n\n```bash\nnt http -c 10 -i 2 -m POST http://10.2.3.10:8080/token\n\n```\n\n#### 💻 Example 3: HTTP ping using the GET http://10.3.4.10:8080/health. The probe will be considered successful if the response status code is within the 200–299 range or exactly 301.\n\n```bash\nnt http -s 2xx -s 301 http://10.3.4.10:8080/health\n\n```\n\n#### 💻 Example 4: Using a proxy with authentication. Perform HTTPS probe via an HTTP proxy at 172.16.200.102:3128, authenticating as user01 (password S@cretPass → encoded as S%40cretPass) and interval is 2 sec :\n\n```bash\nnt http -x http://user01:S%40cretPass@172.16.200.102:3128 -i 2 https://www.youtube.com\n\n```\n\n### DNS Sub-Command\n\n#### DNS Options\n- `-c`:   **DNS Ping Count**  \n  Number of DNS ping requests to send. Default is `0`, which means it will run non-stop until interrupted with `Ctrl+C`.\n\n- `-h`:   **Help**  \n  Display help information for the `dns` subcommand.\n\n- `-i`:   **DNS Ping Interval**  \n  Interval between DNS ping requests in seconds. Default is `1` second.\n\n- `-o`:   **DNS Ping Protocol Type**  \n  Protocol to use for DNS queries (e.g., `udp`, `tcp`). Default is `\"udp\"`.\n\n- `-t`:   **DNS Ping Timeout**  \n  Timeout for each DNS ping request in seconds. Default is `4` seconds.\n\n\n#### 💻 Example 1: DNS ping to \"8.8.8.8\" with query \"google.com\" and have recording enabled\n\n```bash\nnt -r dns 8.8.8.8 google.com\n\n```\n\n#### 💻 Example 2: DNS ping to \"4.2.2.2\" with query \"abc.com\" with count: 10 and interval: 2 sec\n\n```bash\nnt dns -c 10 -i 2 4.2.2.2 abc.com\n\n```\n\n### MTU Sub-Command\n\n#### MTU Options\n- `-s`:   **Ceiling Test Size**  \n  The maximum MTU size to test, in bytes. Default is `1500` bytes.\n\n- `-h`:   **Help**  \n  Display help information for the `mtu` subcommand.\n\n#### 💻 Example 1: MTU check for destination google.com\n```bash\nnt mtu google.com\n\n```\n\n#### 💻 Example 2: MTU check for destination 192.168.1.10 with user defined ceiling test size 9000 set (for Jumbo Frame enabled environment)\n```bash\nnt mtu -s 9000 192.168.1.10\n\n```\n\n### TCP SCAN Sub-Command\n**Note:**  \n- The maximum number of tested ports for each command run is 50.\n\n#### TCP SCAN  Options\n- `-t`:   **TCP Ping test Timeout **  \n  TCP Ping test Timeout (default: 4 sec) (default 4)\n\n- `-h`:   **Help**  \n  Display help information for the `mtu` subcommand.\n\n#### 💻 Example 1: TCP Scan to \"10.123.1.10\" for port \"80, 443, 8080 \u0026 1500-1505\" with recording enabled\n```bash\nnt -r tcpscan 10.123.1.10 80 443 8080 1500-1505\n\n```\n\n#### 💻 Example 2: TCP SCAN to \"10.2.3.10\" for port \"22, 1522-1525 \u0026 8433\" with custom timeout: 5 sec\n```bash\nnt tcpscan -t 5 10.2.3.10 22 1522-1525 8433\n\n```\n\n\n## Logging and Recording\nWhen the `-r` option is enabled, all test results are saved to a CSV file in the same directory as the executable. \n\nDuring the testing/recording process, the CSV file is named in the following format:\n\n```bash\n[recording...]_Record_\u003ctest type\u003e_\u003ctest target host\u003e_\u003ctimestamp\u003e.csv\n\n```\n\nWhen the testing/recording is completed, the file name will be like this:\n\n```bash\nRecord_\u003ctest type\u003e_\u003ctest target host\u003e_\u003ctimestamp\u003e.csv\n\n```\n\n### 📌 Note:\nDuring testing/recording, the file name will be prefixed with \"[recording...]_\". Please DO NOT open this CSV file at that time, as doing so will prevent test records from being saved to the file and will interrupt the test process.\n\n- **Example**: `Record_icmp_google.com_20211012T101530.csv` \n\nThe CSV file captures the detailed test results based on the test type.\n\n\n\n## License\n\nThis project is licensed under the [MIT License](https://opensource.org/licenses/MIT).\n\n\n## Contact\n\n- **Email**: [dennis.jian@packetstreams.net](mailto:dennis.jian@packetstreams.net)\n- **GitHub**: [djian01](https://github.com/djian01)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjian01%2Fnt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjian01%2Fnt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjian01%2Fnt/lists"}