I am trying to set up sock5 proxy setup with firefox + python + selenium. I am having IP and PORT of the proxy server. Even i added username and password it is giving pop up windows.
from selenium import webdriver import time from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.proxy import * profile = webdriver.FirefoxProfile() profile.set_preference("network.proxy.type", 1) profile.set_preference('network.proxy.ssl_port', int(PROXY_PORT)) profile.set_preference('network.proxy.ssl', PROXY_IP) profile.set_preference("network.proxy.http", PROXY_IP) profile.set_preference("network.proxy.http_port", int(PROXY_PORT)) profile.set_preference("network.proxy.no_proxies_on", 'localhost, 127.0.0.1') profile.set_preference("network.proxy.socks_username", PROXY_USERNAME) profile.set_preference("network.proxy.socks_password", PROXY_PASSWORD) profile.update_preferences() driver = webdriver.Firefox(firefox_profile=profile, executable_path="./geckodriver") driver.get("https://www.whatismyip.com/") time.sleep(10) driver.close()
System Information:
- Python 3.8.10
- Ubuntu 20.04
- Mozilla Firefox 99.0