Skip to content

sxueck/tcping

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tcping

tcping is like tcping.exe, but written with Golang.

Usage

  • The default count of ping is 4.

  • If the port is omitted, the default port is 80.

  • The default interval of ping is 1s.

  • The default timeout of ping is 1s.

ping tcp

> tcping google.com 443
Ping tcp://google.com:443 - Connected - time=15.425732ms
Ping tcp://google.com:443 - Connected - time=2.628025ms
Ping tcp://google.com:443 - Connected - time=2.400356ms
Ping tcp://google.com:443 - Connected - time=1.967587ms

Ping statistics tcp://google.com:443
	4 probes sent.
	4 successful, 0 failed.
Approximate trip times:
	Minimum = 1.967587ms, Maximum = 15.425732ms, Average = 5.605425ms

ping http

> tcping -H hui.lu
Ping http://hui.lu:80 - http is open - time=232.880173ms method=GET status=200 bytes=10317
Ping http://hui.lu:80 - http is open - time=60.096446ms method=GET status=200 bytes=10317
Ping http://hui.lu:80 - http is open - time=56.750403ms method=GET status=200 bytes=10317
Ping http://hui.lu:80 - http is open - time=57.886907ms method=GET status=200 bytes=10317

Ping statistics http://hui.lu:80
	4 probes sent.
	4 successful, 0 failed.
Approximate trip times:
	Minimum = 56.750403ms, Maximum = 232.880173ms, Average = 101.903482ms

use proxy ping http

> tcping --proxy socks5://127.0.0.1:7890 https://google.com
Ping https://google.com:443(127.0.0.1:7890) - https is open - time=888.447ms method=GET status=200 bytes=15233
Ping https://google.com:443(127.0.0.1:7890) - https is open - time=736.187ms method=GET status=200 bytes=15282
Ping https://google.com:443(127.0.0.1:7890) - https is open - time=769.856ms method=GET status=200 bytes=15290
Ping https://google.com:443(127.0.0.1:7890) - https is open - time=733.187ms method=GET status=200 bytes=15246

Ping statistics https://google.com:443
        4 probes sent.
        4 successful, 0 failed.
Approximate trip times:
        Minimum = 733.187ms, Maximum = 888.447ms, Average = 781.91925ms

About

ping over a tcp connection

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.0%
  • Makefile 4.0%