Set proxy settings only if proxy host is pingable
Fix proxy condition