This is pretty much impossible as ping works at a much lower level than the proxy.
I am guessing you use a HTTP proxy – it works at a high level; the browser (or yum) only sends it HTTP requests for specific URLs (e.g.
GET http://www.google.com/), and the proxy handles everything else – it might open a TCP connection to the server and forward the request; or it might do something entirely different. HTTP requests are the only thing you can send to them.
Some HTTP proxies are configured to allow the client to open TCP connections (lower level), by making a special request (e.g.
CONNECT www.google.com:443). In this mode, the client and server can exchange data over the TCP connection, but they still do not have any control over actual TCP or IP packets being sent. (Also, usually only specific TCP ports like 443 for HTTPS are allowed.)
The protocol has no mechanism for altering TCP options or using any other protocol than TCP – the client cannot send UDP datagrams, and most importantly in your case, it cannot send/receive ICMP packets, which the ping tool requires.
Note that the word "ping" by itself is more general than the
ping command. It's more likely that yum "pings" the server by making dummy HTTP requests (which makes sense as its task is to determine which server responds to HTTP the fastest, while ICMP pings are quite irrelevant).