I am writing a program which consists of a browser (Firefox) that has been set to use proxy, to go and open websites and links.
Here is a part of my source code:
from selenium import webdriver
def my_proxy(PROXY_HOST,PROXY_PORT):
fp = webdriver.FirefoxProfile()
print PROXY_PORT
print PROXY_HOST
fp.set_preference("network.proxy.type", 1)
fp.set_preference("network.proxy.socks",PROXY_HOST)
fp.set_preference("network.proxy.socks_port",int(PROXY_PORT))
fp.set_preference("general.useragent.override","whatever_useragent")
fp.update_preferences()
return webdriver.Firefox(firefox_profile=fp
How do i turn on the Remote DNS feature?
Set the network.proxy.socks_remote_dns to True:
fp.set_preference("network.proxy.socks_remote_dns", True)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With