Source: Bottopia Blog

Bottopia Blog Setting up proxies in iMacros for Firefox

This is a sample macro on how to set the http proxies in iMacros for Firefox (Proxies are called from a proxy list file named proxylist.csv) VERSION BUILD=6240709 RECORDER=FX TAB T=1 SET !ERRORIGNORE YES SET !DATASOURCE proxylist.csv SET !DATASOURCE_COLUMNS 2 'Increase the current position in the file with each loop SET !DATASOURCE_LINE {{!LOOP} 'clear cookies and cache: CLEAR URL GOTO=about:config 'some proxies are slow, set the timeout to 90 seconds: URL GOTO=javascript:gPrefBranch.setIntPref("network.http.keep-alive.timeout",900); URL GOTO=about:config 'set the proxy URL URL GOTO=javascript:varprefb=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);varstr=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);str.data="{{!COL1}}";prefb.setComplexValue("network.proxy.http",Components.interfaces.nsISupportsString,str); URL GOTO=about:config 'set the proxy port: URL GOTO=javascript:gPrefBranch.setIntPref("network.proxy.http_port",{{!COL2}}); URL GOTO=about:config 'turn the proxy on URL GOTO=javascript:gPrefBranch.setIntPref("network.proxy.type",1) [/code] This is a sample macro on how to set the socks proxies in iMacros for Firefox (Proxies are called from a proxy list file named proxylist-socks.csv) [code title="iMacros script"] VERSION BUILD=6240709 RECORDER=FX TAB T=1 SET !ERRORIGNORE YES SET !DATASOURCE proxylist-socks.csv SET !DATASOURCE_COLUMNS 2 'Increase the current position in the file with each loop SET !DATASOURCE_LINE {{!LOOP} 'clear cookies and cache: CLEAR URL GOTO=about:config 'some proxies are slow, set the timeout to 90 seconds: URL GOTO=javascript:gPrefBranch.setIntPref("network.http.keep-alive.timeout",900); URL GOTO=about:config 'set the proxy URL URL GOTO=javascript:varprefb=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);varstr=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);str.data="{{!COL1}}";prefb.setComplexValue("network.proxy.socks",Components.interfaces.nsISupportsString,str); URL GOTO=about:config 'set the proxy port: URL GOTO=javascript:gPrefBranch.setIntPref("network.proxy.socks_port",{{!COL2}}); URL GOTO=about:config 'turn the proxy on URL GOTO=javascript:gPrefBranch.setIntPref("network.proxy.type",1) Enjoy

Read full article »
Est. Annual Revenue
$100K-5.0M
Est. Employees
1-25
CEO Avatar

CEO

Update CEO

CEO Approval Rating

- -/100