update: README.md

This commit is contained in:
2025-11-24 16:59:18 +08:00
parent d229b22bd8
commit 5636fac3e6

View File

@@ -7,40 +7,43 @@
你可以简单的测试一个域名(或 IP 地址)的某个端口是否开放,默认测试 80 端口
```shell
tcping www.qq.com
使用 www.qq.com 的 A 记录: 175.27.8.138
[1] 来自 175.27.8.138:80 的响应: 时间=29.256ms
[2] 来自 175.27.8.138:80 的响应: 时间=29.086ms
[3] 来自 175.27.8.138:80 的响应: 时间=37.761ms
[4] 来自 175.27.8.138:80 的响应: 时间=30.259ms
$ tcping.exe www.qq.com
Using www.qq.com A record: 101.91.42.232
[1] Reply from 101.91.42.232:80: time=14.400ms
[2] Reply from 101.91.42.232:80: time=15.086ms
[3] Reply from 101.91.42.232:80: time=14.557ms
[4] Reply from 101.91.42.232:80: time=11.862ms
测试完成,成功 4/4 (100.00%)
Test finished, success 4/4 (100.00%)
min = 11.862ms, max = 15.086ms, avg = 13.976ms
```
也可以指定测试端口号,跟随在域名或 IP 地址后面
```shell
tcping www.qq.com 443
使用 www.qq.com 的 A 记录: 175.27.8.138
[1] 来自 175.27.8.138:443 的响应: 时间=28.835ms
[2] 来自 175.27.8.138:443 的响应: 时间=27.419ms
[3] 来自 175.27.8.138:443 的响应: 时间=44.382ms
[4] 来自 175.27.8.138:443 的响应: 时间=28.356ms
$ tcping.exe www.qq.com 443
Using www.qq.com A record: 101.91.42.232
[1] Reply from 101.91.42.232:443: time=12.348ms
[2] Reply from 101.91.42.232:443: time=10.089ms
[3] Reply from 101.91.42.232:443: time=10.370ms
[4] Reply from 101.91.42.232:443: time=9.131ms
测试完成,成功 4/4 (100.00%)
Test finished, success 4/4 (100.00%)
min = 9.131ms, max = 12.348ms, avg = 10.485ms
```
使用 `-6` 指定使用IPv6仅对域名有效
```shell
tcping www.qq.com -6
使用 www.qq.com AAAA 记录: 240e:97c:2f:1::5c
[1] 来自 [240e:97c:2f:1::5c]:80 的响应: 时间=30.795ms
[2] 来自 [240e:97c:2f:1::5c]:80 的响应: 时间=30.247ms
[3] 来自 [240e:97c:2f:1::5c]:80 的响应: 时间=30.856ms
[4] 来自 [240e:97c:2f:1::5c]:80 的响应: 时间=30.275ms
$ tcping.exe www.qq.com -6
Using www.qq.com AAAA record: 240e:e1:a800:120::36
[1] Reply from [240e:e1:a800:120::36]:80: time=17.576ms
[2] Reply from [240e:e1:a800:120::36]:80: time=14.510ms
[3] Reply from [240e:e1:a800:120::36]:80: time=14.667ms
[4] Reply from [240e:e1:a800:120::36]:80: time=15.449ms
测试完成,成功 4/4 (100.00%)
Test finished, success 4/4 (100.00%)
min = 14.510ms, max = 17.576ms, avg = 15.551ms
```
使用 `-c` 指定测试次数默认为4次