code: private HttpURLConnection getConnection(URL url) throws IOException {
          Proxy proxy = Proxy.NO_PROXY;
          if (Property.isProxySet()) {
              SocketAddress addr = new InetSocketAddress(Property.getProxyHost(), Property.getProxyPort());
              proxy = new Proxy(Proxy.Type.HTTP, addr);
          }
          return (HttpURLConnection) url.openConnection(proxy);
      }
docs: Opens the URL connection, and if a proxy is provided, uses the proxy to establish the connection
  
  @param url - the url to connect to
  @return HttpURLConnection: our established http connection
  @throws IOException: if the connection can't be established, an IOException is thrown