trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Harrison <m...@omniti.com>
Subject Re: cacheurl plugin in 3.2.4
Date Fri, 15 Mar 2013 14:27:13 GMT
The regex/cacheurl line I've used in the past is:

http:\/\/(.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com)\/(get_video|videoplayback|videodownload)\?.*?\&(itag=[0-9]*).*?\&(id=[a-zA-Z0-9]*)
http://video-srv.youtube.com.ATSINTERNAL/$3&$4

The following page has some information on how to cache youtube
content and is the source for the above regex:
http://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube#ConfigExamples.2BAC8-DynamicContent.2BAC8-YouTube.2BAC8-Discussion.To_cache_that_content
If you look at the storeurl script, it uses perl to extract the itag,
id and range, and then uses those to form the cache url. The rest of
the parameters are not relevant to the content served, so you can
ignore them. The regex above doesn't include range= (it looks like
that was a more recent update to the squid page) so you'll probably
want to add something to match that also and/or deal with range
requests in another way (remap them to full requests for example).

HTH,

Mark


On Fri, Mar 15, 2013 at 3:47 AM, Mohd Akhbar <mymohaja@gmail.com> wrote:
> Somehow i manage to get the cacheurl plugin to compile, thanks for the hint.
> I would like to test to cache youtube video, but seems like impossible to
> make a regex...example
>
> http://r5---sn-uh-30ad.c.youtube.com/videoplayback?algorithm=throttle-factor&ip=103.31.34.2&sver=3&factor=1.25&fexp=910071%2C914061%2C916625%2C929809%2C920704%2C912806%2C902000%2C919512%2C929901%2C913605%2C906938%2C931202%2C931401%2C908529%2C930803%2C920201%2C929602%2C930101%2C930603%2C900824&itag=35&source=youtube&expire=1363356961&newshard=yes&mt=1363333513&ms=au&upn=hRMl7WiBTbI&mv=m&id=251f971ea2ab9567&key=yt1&burst=40&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&ipbits=8&cp=U0hVSFNQVF9LS0NONV9LSlhKOmxGTVJlTThOdXBC&signature=C59BC1D10B06AF55A5B0AC8BF4C6CBB74246DE4F.BBAB79A56916A7A4561A0C0C19727AA0BB5455F1
>
> this is 1min video that i would like to try...
>
>
> On Thu, Mar 14, 2013 at 9:39 PM, Vasiliy Lukyanets <blc.lukyanets@gmail.com>
> wrote:
>>
>> # uname -a
>> Linux 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012
>> x86_64 x86_64 x86_64 GNU/Linux
>>
>> # cd /root/trafficserver/plugins/experimental/cacheurl
>> # /opt/ts/bin/tsxs -o cacheurl.so -c cacheurl.c
>>   compiling cacheurl.c -> cacheurl.lo
>>   linking -> cacheurl.so
>>
>> # cp cacheurl.so  /opt/ts/libexec/trafficserver
>>
>>
>> 2013/3/14 Mohd Akhbar <mymohaja@gmail.com>
>>>
>>> Just started testing TS, previously on squid. I found that cacheurl
>>> plugin is an interesting but how do i get it to work/compile & requirement
>>> to compile in Centos 6. Any guide that i can refer ?
>>>
>>> Thanks
>>
>>
>



--
Mark Harrison
Lead Site Reliability Engineer
OmniTI

Mime
View raw message