You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Joe Chen <jo...@gmail.com> on 2010/06/24 00:16:35 UTC

Basic: How to Make TS work as a Proxy?

 Thanks you guys for making TS better.  I just came cross it today and
pretty much I am a newbie.

I was able to build the stable version of TS in my Intel Ubuntu-64 and it
seems OK to start and stop.

But I am unable to make TS's proxy working for me.  Could someone kindly
tell me what the mi\inimum configurations I should do to make it work?

FYI, I have tried it with both Transparent Proxy and Explicit Proxy setups.
Neither of them works for me.  Keep in mind that the same setups worked for
Apache HTTP server, Squid, or Varnish.

My goal is to see if I can make use of TS to do Forward Proxy/Caching for
MPEG4 stream videos, and use memory only as the cache storage.

Thanks,

--Joe

Re: Basic: How to Make TS work as a Proxy?

Posted by "Alan M. Carroll" <am...@network-geographics.com>.
Wednesday, June 23, 2010, 6:19:28 PM, you wrote:

> I didn't to anything of Transparent Proxy to TS.  I meant to say I was able
> to configure the same Linux box to make other Proxy Cache servers (Apache
> and Squid) work for me.  I am using iptables(NAT) to intercept traffics to
> port 80 and forward them to port 8080.

Ah, then your problem is very likely that the default configuration is 
for reverse proxy, which will not work in a forward proxy setup.


Re: Basic: How to Make TS work as a Proxy?

Posted by Joe Chen <jo...@gmail.com>.
On Wed, Jun 23, 2010 at 5:02 PM, Alan M. Carroll <
amc@network-geographics.com> wrote:

>
> > FYI, I have tried it with both Transparent Proxy and Explicit Proxy
> setups.
> > Neither of them works for me.  Keep in mind that the same setups worked
> for
> > Apache HTTP server, Squid, or Varnish.
>
> What did you use for trying to enable Transparent Proxy? As far as I
> know, all the code to support transparent proxying was removed.
>
>
I didn't to anything of Transparent Proxy to TS.  I meant to say I was able
to configure the same Linux box to make other Proxy Cache servers (Apache
and Squid) work for me.  I am using iptables(NAT) to intercept traffics to
port 80 and forward them to port 8080.

I did not realize that TS's Transparent Proxy code has been removed.  If
it's true, I will be disappointed.  The Transparent Proxy is needed in my
case of developing a home router platform with pre-loaded cached contents.

Thanks,

--Joe

Re: Basic: How to Make TS work as a Proxy?

Posted by "Alan M. Carroll" <am...@network-geographics.com>.
Wednesday, June 23, 2010, 7:03:06 PM, you wrote:

> Do you know what it takes to restore or add the transparent proxy code if I
> want to do it myself?

Not yet, but I am working on it.

https://issues.apache.org/jira/browse/TS-291


Re: Basic: How to Make TS work as a Proxy?

Posted by Joe Chen <jo...@gmail.com>.
On Wed, Jun 23, 2010 at 5:02 PM, Alan M. Carroll <
amc@network-geographics.com> wrote:

>
> > But I am unable to make TS's proxy working for me.  Could someone kindly
> > tell me what the mi\inimum configurations I should do to make it work?
>
> You probably need to turn off reverse proxy, which is the default.
> Look at
>
> proxy.config.reverse_proxy.enabled
>
> and
>
> proxy.config.url_remap.remap_required
>
> Try setting both of those to 0.
>
>
You are great Alan!  Following your solutions make the Forward Proxy work
right away for me with a browser's Explicit Proxy setup.  Much appreciated.



> > FYI, I have tried it with both Transparent Proxy and Explicit Proxy
> setups.
> > Neither of them works for me.  Keep in mind that the same setups worked
> for
> > Apache HTTP server, Squid, or Varnish.
>
> What did you use for trying to enable Transparent Proxy? As far as I
> know, all the code to support transparent proxying was removed.
>
>
However, without the browser's Explicit Proxy setup (just use iptables' NAT
for a Transparent Proxy), TS does not work.  The log file shows that all the
HTTP request strings are missing the host-name part.

Do you know what it takes to restore or add the transparent proxy code if I
want to do it myself?

--Joe

Re: Basic: How to Make TS work as a Proxy?

Posted by "Alan M. Carroll" <am...@network-geographics.com>.
Wednesday, June 23, 2010, 5:16:35 PM, you wrote:

> But I am unable to make TS's proxy working for me.  Could someone kindly
> tell me what the mi\inimum configurations I should do to make it work?

You probably need to turn off reverse proxy, which is the default. 
Look at

proxy.config.reverse_proxy.enabled

and

proxy.config.url_remap.remap_required

Try setting both of those to 0.

> FYI, I have tried it with both Transparent Proxy and Explicit Proxy setups.
> Neither of them works for me.  Keep in mind that the same setups worked for
> Apache HTTP server, Squid, or Varnish.

What did you use for trying to enable Transparent Proxy? As far as I 
know, all the code to support transparent proxying was removed.