Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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