https://github.com/lvillis/tcping-rs
🛠️ tcping-rs: Rust (rs) TCP Ping (tcping) Utility for Port Reachability.
https://github.com/lvillis/tcping-rs
cli ping rust tcp tcping tcping-rs tcping-rust
Last synced: 9 months ago
JSON representation
🛠️ tcping-rs: Rust (rs) TCP Ping (tcping) Utility for Port Reachability.
- Host: GitHub
- URL: https://github.com/lvillis/tcping-rs
- Owner: lvillis
- License: mit
- Created: 2024-01-14T03:12:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-19T14:27:34.000Z (9 months ago)
- Last Synced: 2025-09-19T16:31:17.836Z (9 months ago)
- Topics: cli, ping, rust, tcp, tcping, tcping-rs, tcping-rust
- Language: Rust
- Homepage:
- Size: 398 KB
- Stars: 18
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
🇺🇸 English ·
🇨🇳 中文 | Table of Contents ↗️
tcping-rs
🛠️ tcping-rs: Rust (rs) TCP Ping (tcping) Utility for Port Reachability.
[](https://crates.io/crates/tcping)
[](https://github.com/lvillis/tcping-rs)
[](https://github.com/lvillis/tcping-rs/actions)
[](https://hub.docker.com/r/lvillis/tcping)
[](https://hub.docker.com/r/lvillis/tcping)
[](mailto:lvillis@outlook.com?subject=Thanks%20for%20tcping-rs!)
---
## ✨ Features
| Feature | Description |
|------------------------------|---------------------------------------------------------------------------|
| **Pure Rust** | No runtime dependencies, produces a tiny static binary |
| **ICMP-free** | Works where traditional `ping` is blocked; relies solely on TCP handshake |
| **Cross-platform** | Linux, macOS, Windows, *BSD, and any Tier-1 Rust target |
| **Continuous / Burst modes** | `-t` for continuous, `-c` for specific count, plus `-e` early exit |
| **Machine-readable output** | JSON / CSV via `-o`, ideal for scripts & monitoring |
| **Jitter stats** | `-j` flag shows latency variance (p95) |
| **Docker image** | Multi-arch (`amd64` / `arm64`) for pipelines or Kubernetes Jobs |
## Usage
```bash
tcping [-c count] [-t] [-e] [-j] [-o mode]
```
Where:
- `host:port` is the host and port to ping
- `-c count` specifies the number of times to ping the host (default: 4)
- `-t` enables continuous pinging
- `-e` exits immediately after a successful probe
- `-j` calculates and displays jitter
- `-o mode` sets the output mode (`normal`, `json`, `csv`)
- `-h` displays help
- `-V` displays version
## Example
```bash
$ tcping github.com:443
Resolved address in 0.9340 ms
Probing 140.82.113.4:443/tcp - Port is open - time=12.7510ms
Probing 140.82.113.4:443/tcp - Port is open - time=12.4270ms
Probing 140.82.113.4:443/tcp - Port is open - time=11.4410ms
Probing 140.82.113.4:443/tcp - Port is open - time=12.7510ms
--- 140.82.113.4:443 tcping statistics ---
4 probes sent, 4 successful, 0.00% packet loss
Round-trip min/avg/max = 11.4410ms/12.3425ms/12.7510ms
Address resolved in 0.9340 ms
```
## Installation
### Download from Releases
Download the precompiled binaries from the [Releases Page](https://github.com/lvillis/tcping-rs/releases).
* Navigate to the [Releases](https://github.com/lvillis/tcping-rs/releases) section.
* Download the appropriate binary for your operating system.
* Extract the executable and place it in a directory included in your PATH.
### Using Docker
Run `tcping-rs` using the Docker image:
```shell
docker run --rm docker.io/lvillis/tcping:latest [options]
```
### Using Nix
`tcping-rs` is available in nixpkgs. To install it system wide:
```nix
environment.systemPackages = [
pkgs.tcping-rs
];
```
Or spawn in a nix-shell:
```console
nix-shell -p tcping-rs
```
## About
This tool allows you to measure the latency to a server using TCP. It is built with Rust and uses the clap library for
command line argument parsing.