I am able to set the proxy in chrome browser using the below java code:
Proxy proxy = new Proxy();
ChromeOptions options = new ChromeOptions();
options.addArguments("--proxy-bypass-list=<-loopback>");
options.addArguments("--ignore-certificate-errors");
proxy.setHttpProxy("localhost:8090");
proxy.setFtpProxy("localhost:8090");
proxy.setSslProxy("localhost:8090");
options.setCapability(CapabilityType.PROXY, proxy);
options.setCapability(ChromeOptions.CAPABILITY, options);
options.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
webDriver = new ChromeDriver(options);
Now, I am using Cypress with javascript and want to do the same as I did above.
Any help will be appreciated.