https://github.com/pouriyajamshidi/tcping/releases/tag/v2.4.0
2023-11-02T02:38:14.png

apt install golang
go install github.com/pouriyajamshidi/tcping@latest

阿里云新加坡节点购买arm云主机

2023-11-02T02:38:35.png

购买完成

2023-11-02T02:38:43.png

公网地址

47.245.81.110

2023-11-02T02:38:51.png

编译tcping

export all_proxy=socks5://192.168.124.139:47891
wget https://golang.google.cn/dl/go1.21.1.linux-arm64.tar.gz
sudo tar xfz go1.21.1.linux-arm64.tar.gz -C /usr/local

sudo vim /etc/profile

export GOROOT=/usr/local/go
export GOPATH=$HOME/gowork
export GOBIN=$GOPATH/bin
export PATH=$GOPATH:$GOBIN:$GOROOT/bin:$PATH

source /etc/profile
wget https://ghproxy.com/https://github.com/pouriyajamshidi/tcping/archive/refs/tags/v2.4.0.tar.gz
tar xzvf v2.4.0.tar.gz
#apt update
#apt install golang-go

yum install -y make gcc 
root@iZt4nh3q4p23v9ykvppdh3Z:~/tcping-2.4.0# make
[+] Cleaning files
[+] Done
[+] Updating Go dependencies
go: downloading github.com/google/go-github/v45 v45.2.0
go: downloading github.com/google/go-github v17.0.0+incompatible
go: downloading github.com/gookit/color v1.5.4
go: downloading github.com/mattn/go-sqlite3 v1.14.17
go: downloading github.com/google/go-querystring v1.1.0
go: downloading golang.org/x/crypto v0.13.0
go: downloading github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e
go: downloading golang.org/x/sys v0.12.0
[+] Done
[+] Running go mod tidy
go: go.mod file indicates go 1.21, but maximum version supported by tidy is 1.18
make: *** [Makefile:143: tidyup] Error 1

编译

make

下载数据到树莓派

2023-11-02T02:39:05.png

测试tcping

root@raspberrypi:/home/admin/tcping# ls
tcping_FreeBSD.tar.gz  tcping_Linux_static.tar.gz  tcping_Linux.tar.gz    tcping_MacOS_ARM.tar.gz  tcping_MacOS.tar.gz
root@raspberrypi:/home/admin/tcping# 
root@raspberrypi:/home/admin/tcping# tar xzvf tcping_Linux_static.tar.gz 
tcping
root@raspberrypi:/home/admin/tcping# ls
tcping    tcping_FreeBSD.tar.gz  tcping_Linux_static.tar.gz  tcping_Linux.tar.gz    tcping_MacOS_ARM.tar.gz  tcping_MacOS.tar.gz
root@raspberrypi:/home/admin/tcping# ./tcping 

TCPING version 2.4.0

Try running ./tcping like:
./tcping <hostname/ip> <port number>. For example:
./tcping www.example.com 443

[optional flags]
  -4 : only use IPv4.
  -6 : only use IPv6.
  -I : interface name or address
  -c : stop after <n> probes, regardless of the result. By default, no limit will be applied.
  --db : path and file name to store tcping output to sqlite database.
  -i : interval between sending probes. Real number allowed with dot as a decimal separator. The default is one second
  -j : output in JSON format.
  --pretty : use indentation when using json output format. No effect without the '-j' flag.
  -r : retry resolving target's hostname after <n> number of failed probes. e.g. -r 10 to retry after 10 failed probes.
  -t : time to wait for a response, in seconds. Real number allowed. 0 means infinite timeout.
  -u : check for updates.
  -v : show version.

测试

tcping -6 2408:8615:4070:0016:0000:0002:0000:0002 61214

2023-11-02T02:39:21.png

最后修改:2024 年 05 月 11 日
如果觉得我的文章对你有用,请随意赞赏