rakefile: handle proxy, and network errors during connection