See the gRPC response times of Zcash Lightwalletd nodes.
![zecping](https://private-user-images.githubusercontent.com/19352366/318984367-bf69c3ea-b429-453a-af06-26dfb78dd20f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3OTI3MjAsIm5iZiI6MTcyNDc5MjQyMCwicGF0aCI6Ii8xOTM1MjM2Ni8zMTg5ODQzNjctYmY2OWMzZWEtYjQyOS00NTNhLWFmMDYtMjZkZmI3OGRkMjBmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDIxMDAyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE5ODJjNjNhZTg3MTMwYjY3MDRhNzJiZTJkN2NlM2M2YTdmNmIxYzQwYmJmYmZjNzJjMmY2MTg0NDVmYWFmZTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.s2Ujox5Dm8e3i-TWKrW-cwRkrmCJE8A85GCFQXCno4U)
Prerequisite: Golang 1.17+
go build
./zecping -help
docker build . -t zp
docker run -ti --rm zp zecping -addr zec.rocks:443
Caveat: most Docker installations do not support IPv6 right now, you may see IPv6 failures.
./zecping -addr mainnet.lightwalletd.com:9067
You can also ping all servers in a list:
./zecping -import servers.txt
For example, to see which servers support IPv6, run this on a connection that supports IPv6:
./zecping -import servers.txt -ipv6
Prerequisite: Install Tor Browser and leave it open (for port 9150), or install the Tor daemon on your local machine (and use port 9050).
TLS is not typical over Tor since the domain name itself authenticates the remote server and traffic is always encrypted to the destination. It is also difficult to obtain SSL certificates for Tor .onion domains, only Digicert offers them at the moment. LetsEncrypt does not support Tor.
./zecping -socks=127.0.0.1:9150 -timeout=30 -addr=hyv2mkrajusr3zutq2ikcwuxyn6azrkthom6hzh7d5xxxgors44dshid.onion:80 -tls=false
./zecping -socks=127.0.0.1:9150 -timeout=30 -addr=hyv2mkrajusr3zutq2ikcwuxyn6azrkthom6hzh7d5xxxgors44dshid.onion:443 -tls=true -insecure
Tunneling requests to sites other than Tor hidden services is also supported, useful to see if they are blocking Tor exits:
./zecping -socks=127.0.0.1:9150 -timeout=30 -addr mainnet.lightwalletd.com:9067
Usage of ./zecping:
-addr string
Zcash Lightwalletd server address in the format of host:port
-import string
Check all servers in a newline-delimited text file
-insecure
Allow insecure SSL connections and skip SSL verification
-ipv4
Only test IPv4 addresses
-ipv6
Only test IPv6 addresses
-socks string
SOCKS proxy address (e.g., '127.0.0.1:9050')
-timeout int
Connection timeout (seconds) (default 10)
-tls
Connection uses TLS if true, else plaintext TCP (default true)
-user_agent string
Custom user agent string (default "zecping/0.1")
-v Enable verbose logging