title: How to set https proxy in selenium
body: <blockquote>
  <p>How to set https proxy in selenium and chromedriver? Here is my code
  to set up http proxy.</p>
  </blockquote>
  <pre><code>        System.setProperty(&quot;webdriver.chrome.driver&quot;,
  &quot;C:\\Users\\lll\\Desktop\\chromedriver.exe&quot;);
          DesiredCapabilities cap = new DesiredCapabilities();
          Proxy proxy=new Proxy();
          String proxyIpAndPort= &quot;123.123.123.123:31288&quot;;
          proxy.setHttpProxy(proxyIpAndPort).setFtpProxy(proxyIpAndPort).setSslProxy(proxyIpAndPort);
          cap.setCapability(CapabilityType.ForSeleniumServer.AVOIDING_PROXY, true);
          cap.setCapability(CapabilityType.ForSeleniumServer.ONLY_PROXYING_SELENIUM_TRAFFIC, true);
          cap.setCapability(CapabilityType.PROXY, proxy);
          driver = new ChromeDriver(cap);
  </code></pre>
  <p>but how can i set https proxy? i have tried:</p>
  <blockquote>
  <p>1.String proxyIpAndport = &quot;123.123.123.123:443&quot;, it is no internet.</p>
  <p>2.String proxyIpAndPort = &quot;123.123.123.123:443@HTTPS&quot;, it can't work of proxy.</p>
  </blockquote>