1

I am using simple program to fetch

https://ipinfo.io

using proxy configuration in python / selenium / firefox webdriver

profile = webdriver.FirefoxProfile()
profile.set_preference("network.proxy.type", 1)
profile.set_preference("network.proxy.http", proxy )
profile.set_preference("network.proxy.http_port", port)
profile.set_preference("network.proxy.https", proxy)
profile.set_preference("network.proxy.https_port", port)
profile.set_preference("network.proxy.ssl", proxy)
profile.set_preference("network.proxy.ssl_port", port)
profile.set_preference("network.proxy.socks", proxy)
profile.set_preference("network.proxy.socks_port", port)

driver = webdriver.Firefox(profile)
url = "https://ipinfo.io"
driver.get(url)
driver.quit()

In proxy log I see

CONNECT tracking-protection.cdn.mozilla.net
CONNECT firefox.settings.services.mozilla.com
CONNECT firefox.settings.services.mozilla.com

What is all this prefetches before the actual url is called ? I don't want these to happen, so what am I suppose to configure ? I even tried

profile.set_preference("browser.startup.homepage_override.mstone", "ignore")
profile.set_preference("startup.homepage_welcome_url.additional", "about:blank")

but still it didn't help and continues to hit those Mozilla URLs

I don't want to overload proxy with additional traffic. What is the way out to this issue ?

Tahseen
  • 1,027
  • 1
  • 12
  • 32

1 Answers1

0
from selenium import webdriver

firefox_profile = webdriver.FirefoxProfile()
firefox_profile.set_preference("browser.privatebrowsing.autostart", True)

driver = webdriver.Firefox(firefox_profile=firefox_profile)

Use incognito mode

PDHide
  • 18,113
  • 2
  • 31
  • 46