BrowserMob 代理不会将 https 资源列入黑名单

BrowserMob proxy doesn't blacklist https resources

我正在使用代理排除第三方资源。但是我对以 https 开头的所有资源都有疑问。你能提出任何解决方案吗? 例如,我试图从 http://linkedin.com 中排除 static.licdn.com 。它改变状态但下载资源。

   public void setUp()    
    throws Exception
{
    setName("test");
    try
    {
        FirefoxBinary firefoxbinary = new FirefoxBinary(new File("firefoxpath"));
        File file = new File("profilePath");
        FirefoxProfile firefoxprofile = new FirefoxProfile(file);
        firefoxprofile.setPreference("browser.startup.homepage", "http://www.google.com");
        BrowserMobProxyServer server = new BrowserMobProxyServer();
        server.start();
        ArrayList arraylist = new ArrayList();
        arraylist.add(new BlacklistEntry(".*static\.licdn\.com.*", 204));
        server.setBlacklist(arraylist);
        org.openqa.selenium.Proxy proxy = ClientUtil.createSeleniumProxy(server);
        proxy.setSslProxy("localhost:" + server.getPort());
        DesiredCapabilities desiredcapabilities = new DesiredCapabilities();
        desiredcapabilities.setCapability("proxy", proxy);
        desiredcapabilities.setCapability("acceptSslCerts", true);
        driver = new FirefoxDriver(firefoxbinary, firefoxprofile, desiredcapabilities);
    }
    catch(Throwable throwable)
    {
        LOG.error("Problem in setup: ", throwable);
    }
}

解决方案 - 我们只需编写用于排除第三方库的自定义插件。不幸的是,由于项目政策,我无法分享我的代码。