cypress error no internet access url behind proxy

cypress throwing an error for no internet access

cy.visit("URL");

Socks5.pac file

function FindProxyForURL(url, host)
{
   if (isInNet(host, "some IPV4 address ", "Some IPV4 Address"))
   return "SOCKS5 localhost:1080; SOCKS5 localhost:8080";
}

Cypress configuraiton file

// cypress.config.js
const { defineConfig } = require('cypress');

module.exports = defineConfig({
  chromeWebSecurity: false,
  env: {
    HTTP_PROXY: 'socks5://localhost:1080',
    // https_proxy: 'socks5://<proxy_host>:<proxy_port>',
    HTTPS_PROXY: 'socks5://localhost:1080',
  },
  e2e: {
    setupNodeEvents(on, config) {
      // Add any custom setup for the e2e tests if needed
      return config;
    },
  },
});

Unable to open web url which under the proxy and secure certificate.