code: public static HttpTransport newTransport(String proxyUrl, String portStr) throws NumberFormatException, GeneralSecurityException, IOException {
      if (!StringUtils.isEmpty(proxyUrl) && !StringUtils.isEmpty(portStr)) {
        return new NetHttpTransport.Builder()
                                   .trustCertificates(GoogleUtils.getCertificateTrustStore())
                                   .setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyUrl, Integer.parseInt(portStr))))
                                   .build();
      }
      return GoogleNetHttpTransport.newTrustedTransport();
    }
docs: Provides HttpTransport. If both proxyUrl and postStr is defined, it provides transport with Proxy.
  @param proxyUrl Optional.
  @param portStr Optional. String type for port so that user can easily pass null. (e.g: state.getProp(key))
  @return
  @throws NumberFormatException
  @throws GeneralSecurityException
  @throws IOException