Refactored code to expose openConnection(), so that Jenkins plugin can override this method to use proxy settings