I can't connect using proxies via Selenium Firefox WebDriver.
With this configuration, the connection is generated but NOT via the proxy but the local server.
There are two questions on this matter and this documentation, but none seem to have solved this for python3:
def selenium_connect():
proxy = "178.20.231.218"
proxy_port = 80
url = "https://www.whatsmyip.org/"
fp = webdriver.FirefoxProfile()
# Direct = 0, Manual = 1, PAC = 2, AUTODETECT = 4, SYSTEM = 5
fp.set_preference("network.proxy.type", 1)
fp.set_preference("network.proxy.http",proxy)
fp.set_preference("network.proxy.http_port",proxy_port)
fp.update_preferences()
driver = webdriver.Firefox(firefox_profile=fp)
driver.get(url)
I'm using Firefox webdriver version 52.0.2 and Python 3.7 and a standard Ubuntu 16.04 Docker environment.