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);
2019-12-21 18:51:38 66KB firefox
1
modify_headers-0.7.1.1-fx.xpi 火狐插件,模拟外网进行相关的测试工作。
2019-12-21 18:50:24 60KB modify headers 0.7.1.1 fx.xpi
1