上传者: luckywq
|
上传时间: 2019-12-21 18:51:38
|
文件大小: 66KB
|
文件类型: xpi
firefox56版本使用插件,已经签名,可以正常使用
File modifyHeaders = new File(pluginPath);
profile.addExtension(modifyHeaders);
profile.setPreference("modifyheaders.headers.count", 1);
profile.setPreference("modifyheaders.headers.action0", "Add");
profile.setPreference("modifyheaders.headers.name1", "x-forwarded-for");
profile.setPreference("modifyheaders.headers.value1", forwarded_ip);
profile.setPreference("modifyheaders.headers.enabled1", true);
profile.setPreference("modifyheaders.config.active", true);
profile.setPreference("modifyheaders.config.alwaysOn", true);
FirefoxBinary firefoxBinary = new FirefoxBinary();
//firefoxBinary.addCommandLineOptions("--headless");
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.setBinary(firefoxBinary);
firefoxOptions.setProfile(profile);