1

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?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
Mads Hansen
  • 113
  • 1
  • 5

1 Answers1

0

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.

hayalci
  • 3,611
  • 3
  • 25
  • 37
  • 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 01:43