code: public static Proxy forPropertiesOpt(String prefix) {
          String host;
          String port;
          Proxy result;
  
          host = System.getProperty(prefix + ".proxyHost");
          if (host == null) {
              return null;
          }
          port = System.getProperty(prefix + ".proxyPort");
          if (port == null) {
              throw new IllegalStateException("missing proxy port for host " + host);
          }
          result = new Proxy(host, Integer.parseInt(port));
          result.excludes.addAll(NON_PROXY_SEP.split(System.getProperty(prefix + ".nonProxyHosts", "")));
          return result;
      }
docs: configures a proxy from properties; if prefix is http or https you get standard system properties
  https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html
  @param prefix is usually the protocol - http or https