module BlackStack::BaseProxy
Public Instance Methods
chrome_switches()
click to toggle source
# File lib/baseproxy.rb, line 6 def chrome_switches return ["--proxy-server=#{self.ip}:#{self.port}","--proxy-user-and-password=#{self.user}:#{self.password}"] end
firefox_profile_parameter(agent_name = nil, profile_name = nil)
click to toggle source
Warning: Out to Date
# File lib/baseproxy.rb, line 11 def firefox_profile_parameter(agent_name = nil, profile_name = nil) if (profile_name == nil) profile = Selenium::WebDriver::Firefox::Profile.new else profile = Selenium::WebDriver::Firefox::Profile.from_name profile_name end if (agent_name!=nil) profile['general.useragent.override'] = agent_name end proxy = Selenium::WebDriver::Proxy.new(:http => self.ip.to_s+":"+self.port.to_s, :ssl => self.ip.to_s+":"+self.port.to_s) profile.proxy = proxy return profile end
phantomjs_switches()
click to toggle source
Warning: Out to Date
# File lib/baseproxy.rb, line 28 def phantomjs_switches return ['--proxy='+self.ip.to_s+':'+self.port.to_s, '--proxy-auth='+self.user.to_s+':'+self.password.to_s, '--ignore-ssl-errors=yes', '--ssl-protocol=any', '--load-images=false'] end