On Thursday 22 Sep 2016 at 06:04, squid-us...@filter.luko.org wrote:

> > i am looking for a proxy which can "bounce" the request, which is not a
> > classic proxy.
> > 
> > I want it works in this way.
> > 
> > e.g. a proxy is running a
> > and when i want to open http://www.yahoo.com, i just need call
> > the proxy can pickup the the host
> > "http://www.yahoo.com"; from the URI, and retrieve the info for me‚Äč, so
> > it need to get the new $host from $location, and remove the $host from
> > the $location before proxy pass it. it is doable via squid?
> Yes it is doable (but unusual).  First you need to tell Squid which requests
> should be rewritten, then send them to a rewrite program to be transformed. 
> Identify the domains like this:

<detail snipped>

> If you input http://www.yahoo.com/page.html, this will be transformed to

I got the impression that the OP wanted the rewrite to work the other way 

Squid sees and  re-writes it to 

> The helper just needs to print that out prepended by "OK rewrite-url=xxx". 
> More info at http://www.squid-cache.org/Doc/config/url_rewrite_program/
> Of course, you will need something listening on (Apache, nginx,
> whatever) that can deal with those rewritten requests.

I got the impression that the OP wanted Squid to be listening on this address, 
doing the rewrites, and then fetching from standard origin servers.

> That is an unusual way of getting requests to though, because
> you are effectively putting the hostname component into the URL then sending
> it to a web service and expecting it to deal with that.

Yes, that's what the OP wants Squid to handle, I think.


"640 kilobytes (of RAM) should be enough for anybody."

 - Bill Gates

                                                   Please reply to the list;
                                                         please *don't* CC me.
squid-users mailing list

Reply via email to