httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <...@joe-lewis.com>
Subject Re: mod_proxy chaining with a .pac file
Date Wed, 23 Jan 2008 18:48:15 GMT
Ralf Mattes wrote:
> On Wed, 2008-01-23 at 11:12 -0700, Joe Lewis wrote:
>   
>> Giovanni Donelli wrote:
>>     
>>> I am trying to make Apache follow the same rules as the browser
>>>   
>>>       
>> Realize that the browser doesn't get the configurations for each website 
>> it visits, it only configures, then runs using the same configuration 
>> for every website.
>>     
>
> Realize that, since a .pac file is a ECMA-Script program, that
> configuration can (and often will) be dynamic. The proxy needs to be
> determined for each request.
>
>   
>> That means it should be easy to create a simple module that has a single 
>> configuration directive that points to the next proxy in the chain, 
>> something like
>>
>> WPADConfiguration http://secondproxyserver.example.com/my-proxy-file.pac
>>
>> And then just configure mod_proxy, mod_proxy_http, and create a handler 
>> that prefaces all URL's with the proxy: string, set the proxyreq setting 
>> in the request_rec to an appropriate value, and return 1 to allow 
>> mod_proxy to handle the rest of it.
>>     
>
> No - that's too simple. The module needs to run the JS function for each
> request and has to be able to dynamically set the proxy.
>   

Indeed - I had completely forgotten about that.  Isn't there a 
javascript library could be connected into, or should the module be 
written in perl to use that?  I suppose parsing the file manually would 
work.  But I don't like reinventing wheels.

Joe
-- 
Joseph Lewis <http://sharktooth.org/>
"Divide the fire, and you will sooner put it out." - Publius Syrus

Mime
View raw message