Is there a way to configure Solaris system settings (not browser configuration) to delegate proxy configuration/logic to a Proxy Auto Configuration (PAC) script?

Most browsers have support for PAC scripts. I am interested in leveraging an existing PAC script for the Solaris system so that curl, Java HTTP, and other network calls would get proxied according to the rules in the PAC.

Is that possible?


There is not a system wide proxy configuration in unix. Programs like wget use http_proxy environment variable, if set. But you cannot rely on this assumption.

Also, PAC scripts can do fancy things like deciding on a proxy based on current IP adress, etc. Your best bet would be to implement the same logic in a script and execute it to set http_proxy variable.

  • I am trying to run some Java code that makes HTTP connections, which need to go through various proxies depending on the host. I have an existing PAC script that is used for browser configurations and wanted to avoid re-coding that logic into a custom ProxySelector class. It sounds as if I am going to have to do it anyway. – Mads Hansen Oct 10 '09 at 1:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.