I found this working solution for Linux. https://askubuntu.com/questions/428408/can-not-ping-google-using-proxy/428414 . Any suggestion for Windows? I tried:
set http_proxy=http://username:password@your_proxy:your_port
ping google.com # works, proxy set for this bash session.
but it does not work (it still says: "Ping request could not find host google.com. Please check the name and try again")