0

I'm using selenium with phantomjs under Ubuntu 16.04. I want to make use of Tor proxy. There is, of course, possibility to set a proxy via host:port pair like so:

from selenium import webdriver
service_args = [
        '--proxy=127.0.0.1:9050',
        '--proxy-type=socks5',
    ]
driver = webdriver.PhantomJS(service_args=service_args)

But I wonder if there is a possibility to make phantomjs use a unix domain socket (configured in Tor, of course) instead of host:port pair. Setting it simply like --proxy=/run/tor/tor.socket does not make the trick - the request to check.torproject.org shows that. Maybe there is some special syntax for that option?

Andrew Kravchuk
  • 356
  • 1
  • 5
  • 17

0 Answers0