code: public static void proxyPort(final int port) {
      final String portValue = Integer.toString(port);
      setProperty("http.proxyPort", portValue);
      setProperty("https.proxyPort", portValue);
    }
docs: Set the 'http.proxyPort' and 'https.proxyPort' properties to the given port
  number.
  <p>
  This setting will apply to all requests.
  
  @param port