Command to check if open proxy works

Hello,

please what is the least server resources intensive linux command to veriffy an open proxy works.

I mean one should probably send and receive any data via this proxy? and if data found it returns true

Assuming proxy is 1.2.3.4:1080

I used this:

curl -x $proxy $url --connect-timeout 8 --max-time 20

but it appears my proxy timeout, but still connect, not sure if after timeout no proxy is used, so i want to load via proxy or return false

If you tell curl to use a proxy, it will always and only, and if it cannot return the url file, that is it. It is not the sort of tool that makes decisions for you. If it did, it'd be mentioned in the man page. If it does anything innovative, it is a bug.