Java Selenium FirefoxDriver忽略给定的代理设置
我希望浏览器显示代理值,但它显示了我的实际IP。知道为什么吗
'''
FirefoxOptions options = new FirefoxOptions();
options.addPreference("network.proxy.type", 1);
options.addPreference("network.proxy.https", "151.253.165.70");
options.addPreference("network.proxy.https_port", 8080);
options.addPreference("network.proxy.https_remote_dns", true);
WebDriver driver = new FirefoxDriver(options);
driver.get("https://www.whatismyip.com");
'''
# 1 楼答案
您可以使用firefoxprofile或options。为Https使用的代理添加SSL。 选项。addPreference(“network.proxy.ssl”、“151.253.165.70”); 选项。addPreference(“network.proxy.ssl_port”,8080)
如果您使用的是个人资料