1

I use two Internet connections so i want to use bash scripts to automate the task of switching between the two.. the problem is i cant able to configure firefox proxy settings via scripts, so is there a way to do that... does any configuration file exists for firefox so that i can modify over command line..

I have read this entry but this dint helped me much.. (its on windows) firefox proxy settings via command line

Community
  • 1
  • 1
Shiv Deepak
  • 3,122
  • 5
  • 34
  • 49

1 Answers1

1

you can use the "automatic proxy configuration" for this. this field takes a "pac" file which in fact is just a javascript function named FindProxyForURL that can use things like dnsResolve or isInNet to determine wether a proxy is needed or not. there is a wikipedia article which describes the files in detail and i have written a blog post a while a go that gives an example function.

Nikolaus Gradwohl
  • 19,708
  • 3
  • 45
  • 61
  • hi... thanks for the reply.. i saw that javascript on your blog and i am quite excited wondering how to use it.. i am n00b at this.. if you give me some more hints then it would help me to figure out the solution much quicker... :) – Shiv Deepak Aug 04 '10 at 05:07
  • you could use the myIpAddress function in an if and deside based on the ipadress of your computer which proxy to return – Nikolaus Gradwohl Aug 04 '10 at 06:11