Re: mod_proxy chaining with a .pac file

2008-01-24 Thread Giovanni Donelli
Great. Thanks! This solve 50% of the problem.
The other problem is to actually plug this into mod_proxy. Is there a hook a
can use to override the connection to the remote server?

What do you guys suggest?

thanks!


On Jan 24, 2008 12:50 PM, Ralf Mattes <[EMAIL PROTECTED]> wrote:

> On Wed, 2008-01-23 at 22:19 +, Giovanni Donelli wrote:
> > Are you talking about a JS lib or a code that does what I need, support
> for
> > .pac proxy chaning?
>
> The later.
> Sorry, that library wasn't linked to from your original post, but it can
> be found on the wikipedia page. Here's a direct link:
>
>  http://code.google.com/p/pacparser/
>
> >From browsing the documentation it looks like it does all you need.
>
>  HTH RalfD
>
>
> > As with regards with JS I was going to use the WebKit's JavaScriptCore.
> >
> >
> > > There _IS_ a library (C and python(?) interface) - downloadable from
> the
> > > google code link posted in the first message ... trivial to link into
> an
> > > Apache module. AFAIK it uses the mozilla JS code.
> > >
> > >  Cheers, RalfD
> > >
> > > > Joe
> > >
> > >
>
>


Re: mod_proxy chaining with a .pac file

2008-01-24 Thread Ralf Mattes
On Wed, 2008-01-23 at 22:19 +, Giovanni Donelli wrote:
> Are you talking about a JS lib or a code that does what I need, support for
> .pac proxy chaning?

The later.
Sorry, that library wasn't linked to from your original post, but it can
be found on the wikipedia page. Here's a direct link:

 http://code.google.com/p/pacparser/

>From browsing the documentation it looks like it does all you need.

 HTH RalfD


> As with regards with JS I was going to use the WebKit's JavaScriptCore.
> 
> 
> > There _IS_ a library (C and python(?) interface) - downloadable from the
> > google code link posted in the first message ... trivial to link into an
> > Apache module. AFAIK it uses the mozilla JS code.
> >
> >  Cheers, RalfD
> >
> > > Joe
> >
> >



Re: mod_proxy chaining with a .pac file

2008-01-23 Thread Giovanni Donelli
Are you talking about a JS lib or a code that does what I need, support for
.pac proxy chaning?

As with regards with JS I was going to use the WebKit's JavaScriptCore.


> There _IS_ a library (C and python(?) interface) - downloadable from the
> google code link posted in the first message ... trivial to link into an
> Apache module. AFAIK it uses the mozilla JS code.
>
>  Cheers, RalfD
>
> > Joe
>
>


Re: mod_proxy chaining with a .pac file

2008-01-23 Thread Giovanni Donelli
On Jan 23, 2008 6:27 PM, Ralf Mattes <[EMAIL PROTECTED]> 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.
>
>
>  Cheers, RalfD
>

Thanks RalfD. You got exactly the point.


Re: mod_proxy chaining with a .pac file

2008-01-23 Thread Ralf Mattes
On Wed, 2008-01-23 at 11:48 -0700, Joe Lewis wrote:
> 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.

There _IS_ a library (C and python(?) interface) - downloadable from the
google code link posted in the first message ... trivial to link into an
Apache module. AFAIK it uses the mozilla JS code.

 Cheers, RalfD

> Joe



Re: mod_proxy chaining with a .pac file

2008-01-23 Thread Joe Lewis

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 
"Divide the fire, and you will sooner put it out." - Publius Syrus


Re: mod_proxy chaining with a .pac file

2008-01-23 Thread Ralf Mattes
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.


 Cheers, RalfD
 
> Joe
> 
> 
> > On Jan 23, 2008 2:34 PM, Joe Lewis <[EMAIL PROTECTED]> wrote:
> >
> >   
> >> Giovanni Donelli wrote:
> >> 
> >>> Take this pac file:
> >>> $ curl http://wpad.wws.lan/wpad.dat
> >>> function FindProxyForURL(url, host)
> >>> {
> >>> // simple hostname
> >>> if (dnsDomainLevels(host) == 0) {return "DIRECT";}
> >>>
> >>> // match Host against local domains (w/ optional :port)
> >>> var dom = /(127\.\d+\.\d+\.\d+|\.wws\.lan\.?|\.local\.?)(:\d+)?/;
> >>> if(dom.test(host)) { return "DIRECT"; }
> >>>
> >>> // All other requests go through port 8080 of proxy
> >>> // should that fail to respond, go direct:
> >>> return "PROXY proxy.wws.lan:8080; DIRECT";
> >>> }
> >>>
> >>> Obviously the browser needs to evaluate the URL each time it wants to
> >>>   
> >> make
> >> 
> >>> an http request. So I want to do that in my proxy.
> >>>
> >>> Currently proxy chaning in mod_proxy supports only say:
> >>> ProxyRemote * x.y.z.w
> >>>
> >>> Now not having found mod_proxy can help me in that, I thought about
> >>>   
> >> writing
> >> 
> >>> a mod that in apache would interpret a pac file. In my configuration,
> >>>   
> >> the
> >> 
> >>> browser can not be aware of the pac file, only my proxy.
> >>>
> >>> I tried to explain you what was my project doing, instead of asking how
> >>> override the connection to a server.
> >>>
> >>> if this is not a subject of interest of this group, I do apologize for
> >>> having misunderstood the aim of it. However I still don't understand why
> >>> this should be offtopic.
> >>>
> >>> Giovanni
> >>>
> >>> PS: I couldn't figure out a way to search into archives from
> >>> http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/. I used
> >>>   
> >> google
> >> 
> >>> "site:" option, and found no entry for "pac" or wpad.
> >>>
> >>>
> >>>
> >>> On Jan 22, 2008 6:20 PM, Joe Lewis <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>   
>  First, I want to apologize for keeping this off-topic conversation one
>  last time on the mailing list.  I think if we allow this to be
>  
> >> archived,
> >> 
>  any questions should be more easily answered using archives, hopefully
>  reducing our work load.
> 
> 
>  Giovanni Donelli wrote:
> 
>  
> > Hi
> >Thanks for your reply. I do apologize for not being clear. I will
> > try to restate what I want to achieve. For the sake of this discussion
> > allow me to simplify the browser/internet interaction as follows:
> >
> > User enters URL in browser ->  **browser resolves domain name** ->
> > connect to server x -> HTTP request
> >
> > In the way the browser **resolves** the DNS is where the pac file is
> >
> >   
>  used.
> 
>  You may want to read and understand the specification first.  Remember
>  that browsers do not reconfigure each time a page is hit - they obtain
>  the configuration once (via a direct URL to a .pac, a DHCP response, or
>  a DNS lookup for a wpad hostname - it's in the spec).
> 
>  The only time in those activities that apache could be involved is in
>  the direct URL to a .pac file - and it's a static .pac file you drop on
>  the web server, or serve the proxy.dat file that the DHCP specified or
>  the DNS method is trying to find.  In any way, nothing according to
>  apache is occurring that is dynamic - it's just serving a .pac or .dat
>  file.
> 
>  Which means there is no need to set up an apache module that handles
>  stuff like this unless you are really crazy and want to construct a
>  dynamically generated .pac/.dat file (I would not suggest this).
> 
>  If that is the direction you want to go, we may be able to assist -
>  

Re: mod_proxy chaining with a .pac file

2008-01-23 Thread Joe Lewis

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.


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.


Joe



On Jan 23, 2008 2:34 PM, Joe Lewis <[EMAIL PROTECTED]> wrote:

  

Giovanni Donelli wrote:


Take this pac file:
$ curl http://wpad.wws.lan/wpad.dat
function FindProxyForURL(url, host)
{
// simple hostname
if (dnsDomainLevels(host) == 0) {return "DIRECT";}

// match Host against local domains (w/ optional :port)
var dom = /(127\.\d+\.\d+\.\d+|\.wws\.lan\.?|\.local\.?)(:\d+)?/;
if(dom.test(host)) { return "DIRECT"; }

// All other requests go through port 8080 of proxy
// should that fail to respond, go direct:
return "PROXY proxy.wws.lan:8080; DIRECT";
}

Obviously the browser needs to evaluate the URL each time it wants to
  

make


an http request. So I want to do that in my proxy.

Currently proxy chaning in mod_proxy supports only say:
ProxyRemote * x.y.z.w

Now not having found mod_proxy can help me in that, I thought about
  

writing


a mod that in apache would interpret a pac file. In my configuration,
  

the


browser can not be aware of the pac file, only my proxy.

I tried to explain you what was my project doing, instead of asking how
override the connection to a server.

if this is not a subject of interest of this group, I do apologize for
having misunderstood the aim of it. However I still don't understand why
this should be offtopic.

Giovanni

PS: I couldn't figure out a way to search into archives from
http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/. I used
  

google


"site:" option, and found no entry for "pac" or wpad.



On Jan 22, 2008 6:20 PM, Joe Lewis <[EMAIL PROTECTED]> wrote:


  

First, I want to apologize for keeping this off-topic conversation one
last time on the mailing list.  I think if we allow this to be


archived,


any questions should be more easily answered using archives, hopefully
reducing our work load.


Giovanni Donelli wrote:



Hi
   Thanks for your reply. I do apologize for not being clear. I will
try to restate what I want to achieve. For the sake of this discussion
allow me to simplify the browser/internet interaction as follows:

User enters URL in browser ->  **browser resolves domain name** ->
connect to server x -> HTTP request

In the way the browser **resolves** the DNS is where the pac file is

  

used.

You may want to read and understand the specification first.  Remember
that browsers do not reconfigure each time a page is hit - they obtain
the configuration once (via a direct URL to a .pac, a DHCP response, or
a DNS lookup for a wpad hostname - it's in the spec).

The only time in those activities that apache could be involved is in
the direct URL to a .pac file - and it's a static .pac file you drop on
the web server, or serve the proxy.dat file that the DHCP specified or
the DNS method is trying to find.  In any way, nothing according to
apache is occurring that is dynamic - it's just serving a .pac or .dat
file.

Which means there is no need to set up an apache module that handles
stuff like this unless you are really crazy and want to construct a
dynamically generated .pac/.dat file (I would not suggest this).

If that is the direction you want to go, we may be able to assist -
however, I doubt that is what you want.  Most proxy servers have static
IP addresses, which means the .pac/.dat file should be static as well.

Once again, may apologies to those who are expecting module development
assistance in this as we're not sure we even need it yet.

Joe
--
Joseph Lewis 
"Divide the fire, and you will sooner put it out." - Publius Syrus



  

Are you trying to make Apache follow the same rules as the browser when
it proxies (as in a proxy that uses a proxy), or just trying to set it
up?  (as in double proxy)?

Joe
--
Joseph Lewis 
"Divide the fire, and you will sooner put it out." - Publius Syrus




  



--
Joseph Lewis 
"Divide the fire, and you will sooner put it out." - Publius Syrus


Re: mod_proxy chaining with a .pac file - OFF-TOPIC?

2008-01-23 Thread Giovanni Donelli
I am trying to make Apache follow the same rules as the browser

On Jan 23, 2008 2:34 PM, Joe Lewis <[EMAIL PROTECTED]> wrote:

> Giovanni Donelli wrote:
> > Take this pac file:
> > $ curl http://wpad.wws.lan/wpad.dat
> > function FindProxyForURL(url, host)
> > {
> > // simple hostname
> > if (dnsDomainLevels(host) == 0) {return "DIRECT";}
> >
> > // match Host against local domains (w/ optional :port)
> > var dom = /(127\.\d+\.\d+\.\d+|\.wws\.lan\.?|\.local\.?)(:\d+)?/;
> > if(dom.test(host)) { return "DIRECT"; }
> >
> > // All other requests go through port 8080 of proxy
> > // should that fail to respond, go direct:
> > return "PROXY proxy.wws.lan:8080; DIRECT";
> > }
> >
> > Obviously the browser needs to evaluate the URL each time it wants to
> make
> > an http request. So I want to do that in my proxy.
> >
> > Currently proxy chaning in mod_proxy supports only say:
> > ProxyRemote * x.y.z.w
> >
> > Now not having found mod_proxy can help me in that, I thought about
> writing
> > a mod that in apache would interpret a pac file. In my configuration,
> the
> > browser can not be aware of the pac file, only my proxy.
> >
> > I tried to explain you what was my project doing, instead of asking how
> > override the connection to a server.
> >
> > if this is not a subject of interest of this group, I do apologize for
> > having misunderstood the aim of it. However I still don't understand why
> > this should be offtopic.
> >
> > Giovanni
> >
> > PS: I couldn't figure out a way to search into archives from
> > http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/. I used
> google
> > "site:" option, and found no entry for "pac" or wpad.
> >
> >
> >
> > On Jan 22, 2008 6:20 PM, Joe Lewis <[EMAIL PROTECTED]> wrote:
> >
> >
> >> First, I want to apologize for keeping this off-topic conversation one
> >> last time on the mailing list.  I think if we allow this to be
> archived,
> >> any questions should be more easily answered using archives, hopefully
> >> reducing our work load.
> >>
> >>
> >> Giovanni Donelli wrote:
> >>
> >>> Hi
> >>>Thanks for your reply. I do apologize for not being clear. I will
> >>> try to restate what I want to achieve. For the sake of this discussion
> >>> allow me to simplify the browser/internet interaction as follows:
> >>>
> >>> User enters URL in browser ->  **browser resolves domain name** ->
> >>> connect to server x -> HTTP request
> >>>
> >>> In the way the browser **resolves** the DNS is where the pac file is
> >>>
> >> used.
> >>
> >> You may want to read and understand the specification first.  Remember
> >> that browsers do not reconfigure each time a page is hit - they obtain
> >> the configuration once (via a direct URL to a .pac, a DHCP response, or
> >> a DNS lookup for a wpad hostname - it's in the spec).
> >>
> >> The only time in those activities that apache could be involved is in
> >> the direct URL to a .pac file - and it's a static .pac file you drop on
> >> the web server, or serve the proxy.dat file that the DHCP specified or
> >> the DNS method is trying to find.  In any way, nothing according to
> >> apache is occurring that is dynamic - it's just serving a .pac or .dat
> >> file.
> >>
> >> Which means there is no need to set up an apache module that handles
> >> stuff like this unless you are really crazy and want to construct a
> >> dynamically generated .pac/.dat file (I would not suggest this).
> >>
> >> If that is the direction you want to go, we may be able to assist -
> >> however, I doubt that is what you want.  Most proxy servers have static
> >> IP addresses, which means the .pac/.dat file should be static as well.
> >>
> >> Once again, may apologies to those who are expecting module development
> >> assistance in this as we're not sure we even need it yet.
> >>
> >> Joe
> >> --
> >> Joseph Lewis 
> >> "Divide the fire, and you will sooner put it out." - Publius Syrus
> >>
> >>
> >
> >
> Are you trying to make Apache follow the same rules as the browser when
> it proxies (as in a proxy that uses a proxy), or just trying to set it
> up?  (as in double proxy)?
>
> Joe
> --
> Joseph Lewis 
> "Divide the fire, and you will sooner put it out." - Publius Syrus
>


Re: mod_proxy chaining with a .pac file - OFF-TOPIC?

2008-01-23 Thread Joe Lewis

Giovanni Donelli wrote:

Take this pac file:
$ curl http://wpad.wws.lan/wpad.dat
function FindProxyForURL(url, host)
{
// simple hostname
if (dnsDomainLevels(host) == 0) {return "DIRECT";}

// match Host against local domains (w/ optional :port)
var dom = /(127\.\d+\.\d+\.\d+|\.wws\.lan\.?|\.local\.?)(:\d+)?/;
if(dom.test(host)) { return "DIRECT"; }

// All other requests go through port 8080 of proxy
// should that fail to respond, go direct:
return "PROXY proxy.wws.lan:8080; DIRECT";
}

Obviously the browser needs to evaluate the URL each time it wants to make
an http request. So I want to do that in my proxy.

Currently proxy chaning in mod_proxy supports only say:
ProxyRemote * x.y.z.w

Now not having found mod_proxy can help me in that, I thought about writing
a mod that in apache would interpret a pac file. In my configuration, the
browser can not be aware of the pac file, only my proxy.

I tried to explain you what was my project doing, instead of asking how
override the connection to a server.

if this is not a subject of interest of this group, I do apologize for
having misunderstood the aim of it. However I still don't understand why
this should be offtopic.

Giovanni

PS: I couldn't figure out a way to search into archives from
http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/. I used google
"site:" option, and found no entry for "pac" or wpad.



On Jan 22, 2008 6:20 PM, Joe Lewis <[EMAIL PROTECTED]> wrote:

  

First, I want to apologize for keeping this off-topic conversation one
last time on the mailing list.  I think if we allow this to be archived,
any questions should be more easily answered using archives, hopefully
reducing our work load.


Giovanni Donelli wrote:


Hi
   Thanks for your reply. I do apologize for not being clear. I will
try to restate what I want to achieve. For the sake of this discussion
allow me to simplify the browser/internet interaction as follows:

User enters URL in browser ->  **browser resolves domain name** ->
connect to server x -> HTTP request

In the way the browser **resolves** the DNS is where the pac file is
  

used.

You may want to read and understand the specification first.  Remember
that browsers do not reconfigure each time a page is hit - they obtain
the configuration once (via a direct URL to a .pac, a DHCP response, or
a DNS lookup for a wpad hostname - it's in the spec).

The only time in those activities that apache could be involved is in
the direct URL to a .pac file - and it's a static .pac file you drop on
the web server, or serve the proxy.dat file that the DHCP specified or
the DNS method is trying to find.  In any way, nothing according to
apache is occurring that is dynamic - it's just serving a .pac or .dat
file.

Which means there is no need to set up an apache module that handles
stuff like this unless you are really crazy and want to construct a
dynamically generated .pac/.dat file (I would not suggest this).

If that is the direction you want to go, we may be able to assist -
however, I doubt that is what you want.  Most proxy servers have static
IP addresses, which means the .pac/.dat file should be static as well.

Once again, may apologies to those who are expecting module development
assistance in this as we're not sure we even need it yet.

Joe
--
Joseph Lewis 
"Divide the fire, and you will sooner put it out." - Publius Syrus




  
Are you trying to make Apache follow the same rules as the browser when 
it proxies (as in a proxy that uses a proxy), or just trying to set it 
up?  (as in double proxy)?


Joe
--
Joseph Lewis 
"Divide the fire, and you will sooner put it out." - Publius Syrus


Re: mod_proxy chaining with a .pac file - OFF-TOPIC?

2008-01-23 Thread Giovanni Donelli
Take this pac file:
$ curl http://wpad.wws.lan/wpad.dat
function FindProxyForURL(url, host)
{
// simple hostname
if (dnsDomainLevels(host) == 0) {return "DIRECT";}

// match Host against local domains (w/ optional :port)
var dom = /(127\.\d+\.\d+\.\d+|\.wws\.lan\.?|\.local\.?)(:\d+)?/;
if(dom.test(host)) { return "DIRECT"; }

// All other requests go through port 8080 of proxy
// should that fail to respond, go direct:
return "PROXY proxy.wws.lan:8080; DIRECT";
}

Obviously the browser needs to evaluate the URL each time it wants to make
an http request. So I want to do that in my proxy.

Currently proxy chaning in mod_proxy supports only say:
ProxyRemote * x.y.z.w

Now not having found mod_proxy can help me in that, I thought about writing
a mod that in apache would interpret a pac file. In my configuration, the
browser can not be aware of the pac file, only my proxy.

I tried to explain you what was my project doing, instead of asking how
override the connection to a server.

if this is not a subject of interest of this group, I do apologize for
having misunderstood the aim of it. However I still don't understand why
this should be offtopic.

Giovanni

PS: I couldn't figure out a way to search into archives from
http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/. I used google
"site:" option, and found no entry for "pac" or wpad.



On Jan 22, 2008 6:20 PM, Joe Lewis <[EMAIL PROTECTED]> wrote:

> First, I want to apologize for keeping this off-topic conversation one
> last time on the mailing list.  I think if we allow this to be archived,
> any questions should be more easily answered using archives, hopefully
> reducing our work load.
>
>
> Giovanni Donelli wrote:
> > Hi
> >Thanks for your reply. I do apologize for not being clear. I will
> > try to restate what I want to achieve. For the sake of this discussion
> > allow me to simplify the browser/internet interaction as follows:
> >
> > User enters URL in browser ->  **browser resolves domain name** ->
> > connect to server x -> HTTP request
> >
> > In the way the browser **resolves** the DNS is where the pac file is
> used.
>
> You may want to read and understand the specification first.  Remember
> that browsers do not reconfigure each time a page is hit - they obtain
> the configuration once (via a direct URL to a .pac, a DHCP response, or
> a DNS lookup for a wpad hostname - it's in the spec).
>
> The only time in those activities that apache could be involved is in
> the direct URL to a .pac file - and it's a static .pac file you drop on
> the web server, or serve the proxy.dat file that the DHCP specified or
> the DNS method is trying to find.  In any way, nothing according to
> apache is occurring that is dynamic - it's just serving a .pac or .dat
> file.
>
> Which means there is no need to set up an apache module that handles
> stuff like this unless you are really crazy and want to construct a
> dynamically generated .pac/.dat file (I would not suggest this).
>
> If that is the direction you want to go, we may be able to assist -
> however, I doubt that is what you want.  Most proxy servers have static
> IP addresses, which means the .pac/.dat file should be static as well.
>
> Once again, may apologies to those who are expecting module development
> assistance in this as we're not sure we even need it yet.
>
> Joe
> --
> Joseph Lewis 
> "Divide the fire, and you will sooner put it out." - Publius Syrus
>


Re: mod_proxy chaining with a .pac file - OFF-TOPIC?

2008-01-22 Thread Joe Lewis
First, I want to apologize for keeping this off-topic conversation one 
last time on the mailing list.  I think if we allow this to be archived, 
any questions should be more easily answered using archives, hopefully 
reducing our work load.



Giovanni Donelli wrote:

Hi
   Thanks for your reply. I do apologize for not being clear. I will 
try to restate what I want to achieve. For the sake of this discussion 
allow me to simplify the browser/internet interaction as follows:


User enters URL in browser ->  **browser resolves domain name** -> 
connect to server x -> HTTP request


In the way the browser **resolves** the DNS is where the pac file is used.


You may want to read and understand the specification first.  Remember 
that browsers do not reconfigure each time a page is hit - they obtain 
the configuration once (via a direct URL to a .pac, a DHCP response, or 
a DNS lookup for a wpad hostname - it's in the spec).


The only time in those activities that apache could be involved is in 
the direct URL to a .pac file - and it's a static .pac file you drop on 
the web server, or serve the proxy.dat file that the DHCP specified or 
the DNS method is trying to find.  In any way, nothing according to 
apache is occurring that is dynamic - it's just serving a .pac or .dat file.


Which means there is no need to set up an apache module that handles 
stuff like this unless you are really crazy and want to construct a 
dynamically generated .pac/.dat file (I would not suggest this).


If that is the direction you want to go, we may be able to assist - 
however, I doubt that is what you want.  Most proxy servers have static 
IP addresses, which means the .pac/.dat file should be static as well.


Once again, may apologies to those who are expecting module development 
assistance in this as we're not sure we even need it yet.


Joe
--
Joseph Lewis 
"Divide the fire, and you will sooner put it out." - Publius Syrus


Re: mod_proxy chaining with a .pac file

2008-01-22 Thread Giovanni Donelli
Hi   Thanks for your reply. I do apologize for not being clear. I will try
to restate what I want to achieve. For the sake of this discussion allow me
to simplify the browser/internet interaction as follows:

User enters URL in browser ->  **browser resolves domain name** ->
connect to server x -> HTTP request

In the way the browser **resolves** the DNS is where the pac file is used.

This is what I would like to do:

User enters URL in browser -> browser always connects to my proxy server
-> HTTP request -> proxy receives req. -> **proxy uses a .pac to determine
destination server.** -> HTTP request...

Where with "proxy server" I mean apache configured to run as proxy with
"mod_proxy".

There are lot of problems involved with doing this (ie javascript
interpreter), however the first one I have is to have a component that plugs
in mod_proxy and allows me connect to whatever server it wants, instead of
relying on regular DNS lookup.

I hope it makes more sense now, thank you in advance,

Giovanni Donelli



On Jan 22, 2008 2:39 PM, Joe Lewis <[EMAIL PROTECTED]> wrote:

> Giovanni Donelli wrote:
> > Dear mod developers,I would like my apache proxy (mod_proxy) to take
> a
> > .pac file for proxy chaining.
> > To my understanding I can only set proxy chaining to a single server.
> This
> > is very unfortunate because pac is used by a lot of people:
> >
> > http://en.wikipedia.org/wiki/Proxy_auto-config
> >
>
> First, are you meaning how a web browser configures it's own proxy (the
> above link talks about this)?  Or are you talking about using apache to
> create a .pac file (a topic for another list)?  Or are you writing a
> module that will support the DHCP and/or DNS to handle the WPAD look
> ups?  (If using a .pac file, just place the .pac file in a directory and
> configure the web browser.  If using the fully automatic, you have to
> reconfigure DHCP or DNS to handle it.  The web browser itself only
> replies with the .pac or .dat file if specified.)
> > Question number 1:
> > - is there a way, if you know, to configure apache to support "
> > Proxy_auto-config" proxy chaining?
> >
>
> See the above answer regarding setting up the other services.
>
> > if there is not... then I am willing to write a mod to do it, which
> leads me
> > to second question:
> >
> > Question number 2:
> > - At what stage (which hook) does the actual selection&connection to the
> > remote server occur? Will it be possible to override it?
> >
>
> There is no "selection" to the server.  All web connections happen over
> TCP on IPv4 or IPv6 - "selection" would be more of a term for
> broadcasting a packet (UDP) or multicasting - none of which apply to the
> web server.
>
> All that I've said so far can be summed up succinctly : a connection to
> a web server will not be made until the web browser has been configured,
> or tries to retrieve a configuration file, which only comes from DHCP or
> DNS requests for a wpad host on the network.
>
> Joe
> --
> Joseph Lewis 
> "Divide the fire, and you will sooner put it out." - Publius Syrus
>


Re: mod_proxy chaining with a .pac file

2008-01-22 Thread Joe Lewis

Giovanni Donelli wrote:

Dear mod developers,I would like my apache proxy (mod_proxy) to take a
.pac file for proxy chaining.
To my understanding I can only set proxy chaining to a single server. This
is very unfortunate because pac is used by a lot of people:

http://en.wikipedia.org/wiki/Proxy_auto-config
  


First, are you meaning how a web browser configures it's own proxy (the 
above link talks about this)?  Or are you talking about using apache to 
create a .pac file (a topic for another list)?  Or are you writing a 
module that will support the DHCP and/or DNS to handle the WPAD look 
ups?  (If using a .pac file, just place the .pac file in a directory and 
configure the web browser.  If using the fully automatic, you have to 
reconfigure DHCP or DNS to handle it.  The web browser itself only 
replies with the .pac or .dat file if specified.)

Question number 1:
- is there a way, if you know, to configure apache to support "
Proxy_auto-config" proxy chaining?
  


See the above answer regarding setting up the other services.


if there is not... then I am willing to write a mod to do it, which leads me
to second question:

Question number 2:
- At what stage (which hook) does the actual selection&connection to the
remote server occur? Will it be possible to override it?
  


There is no "selection" to the server.  All web connections happen over 
TCP on IPv4 or IPv6 - "selection" would be more of a term for 
broadcasting a packet (UDP) or multicasting - none of which apply to the 
web server.


All that I've said so far can be summed up succinctly : a connection to 
a web server will not be made until the web browser has been configured, 
or tries to retrieve a configuration file, which only comes from DHCP or 
DNS requests for a wpad host on the network.


Joe
--
Joseph Lewis 
"Divide the fire, and you will sooner put it out." - Publius Syrus


mod_proxy chaining with a .pac file

2008-01-22 Thread Giovanni Donelli
Dear mod developers,I would like my apache proxy (mod_proxy) to take a
.pac file for proxy chaining.
To my understanding I can only set proxy chaining to a single server. This
is very unfortunate because pac is used by a lot of people:

http://en.wikipedia.org/wiki/Proxy_auto-config

Question number 1:
- is there a way, if you know, to configure apache to support "
Proxy_auto-config" proxy chaining?

if there is not... then I am willing to write a mod to do it, which leads me
to second question:

Question number 2:
- At what stage (which hook) does the actual selection&connection to the
remote server occur? Will it be possible to override it?


THANK YOU!
Giovanni