code: @VisibleForTesting
    static URI parseProxyAddress(@Nullable String proxyAddress) {
      if (Strings.isNullOrEmpty(proxyAddress)) {
        return null;
      }
      String uriString = (proxyAddress.contains("//") ? "" : "//") + proxyAddress;
      try {
        URI uri = new URI(uriString);
        String scheme = uri.getScheme();
        String host = uri.getHost();
        int port = uri.getPort();
        checkArgument(
            Strings.isNullOrEmpty(scheme) || scheme.matches("https?"),
            "HTTP proxy address '%s' has invalid scheme '%s'.", proxyAddress, scheme);
        checkArgument(!Strings.isNullOrEmpty(host), "Proxy address '%s' has no host.", proxyAddress);
        checkArgument(port != -1, "Proxy address '%s' has no port.", proxyAddress);
        checkArgument(
            uri.equals(new URI(scheme, null, host, port, null, null, null)),
            "Invalid proxy address '%s'.", proxyAddress);
        return uri;
      } catch (URISyntaxException e) {
        throw new IllegalArgumentException(
            String.format("Invalid proxy address '%s'.", proxyAddress), e);
      }
    }
docs: Parse an HTTP proxy from a String address.
  @param proxyAddress The address of the proxy of the form (https?://)HOST:PORT.
  @return The URI of the proxy.
  @throws IllegalArgumentException If the address is invalid.