code: public void parse(Proxy proxy) {
      if (proxy.getProxyType() == Proxy.ProxyType.UNSPECIFIED) {
        return;
      }
  
      reset();
  
      switch (proxy.getProxyType()) {
        case DIRECT:
          if (!product.is(MOBILE)) {
            setEnabled(false);
          }
          setUsePAC(false);
          break;
  
        case MANUAL:
          if (!product.is(MOBILE)) {
            setEnabled(true);
          }
          setUsePAC(false);
  
          // TODO(andreastt): HTTPS proxy
          // TODO(andreastt): SOCKS proxy
  
          if (proxy.getHttpProxy() != null) {
            setHttpProxy(proxy.getHttpProxy());
          }
          if (proxy.getFtpProxy() != null) {
            setFtpProxy(proxy.getFtpProxy());
          }
  
          break;
  
        case PAC:
          if (!product.is(MOBILE)) {
            setEnabled(true);
          }
          setUsePAC(true);
  
          if (proxy.getProxyAutoconfigUrl() != null) {
            setAutoconfigUrl(proxy.getProxyAutoconfigUrl());
          }
  
          break;
  
        default:
          logger.warning("Unsupported proxy type: " + proxy.getProxyType());
      }
    }
docs: Parse an instance of {@link Proxy}, merge and apply its configuration to the current Opera
  instance.