You can use httping
to check the network through the SOCKS server instead of the ordinary ping
.
ping: send ICMP ECHO_REQUEST packets to network hosts
httping: measure the latency and throughput of a webserver
ICMP works at Layer3(the Network Layer) of the OSI model, SOCKS works at Layer5(the Session Layer), httping works at Layer7(the Application Layer), so ping
message cannot pass though the SOCKS, but httping
message can.
For example, I setup a shadowsocks(a SOCKS5 proxy) server in a VPS, use my macbook pro as a client using 127.0.0.1:1080, and I want to check if the network to google is good.
httping -x 127.0.0.1:1080 -g http://www.google.com -5
screen capture of httping google through SOCKS5
httping usage
httping [options]
-5 The proxy server selected is a SOCKS5 server.
-g url This selects the url to probe. E.g.: http://localhost/
-x proxyhost[:port] Probe using a proxyserver.