You are hereForums / Suggestions / TOS/DSCP

Videocache 1.9.5 is available now. This version improves support for logging and fixes video caching problems for various sites like Vimeo, Break, Tube8 etc due to change in URL patterns. Also, from this version onwards, UrlGrabber has been removed from dependencies. Check Changelog for details. If you have purchased version 1.9.x previously, you can claim free upgrade by contacting using Contact Link. Please mention the email address using which you purchased Videocache. New users proceed to download page right now, secure your copy and enjoy caching :-)

TOS/DSCP


27 replies [Last post]
Anonymous
TOS/DSCP
Printer-friendly versionSend to friend

It would be great if you can add TOS/DSCP support for youtube_cache , it will stream the videos to my users and bypass the download limits

admin's picture
Offline
Joined: Nov 2 2008

TOS/DSCP is a squid thing and you can set that in squid configuration itself. Youtube Cache is just a plugin to help squid in caching dynamic videos served by various websites.

Anonymous (not verified)

you are right , but take a look at this from access.log
192.168.0.3 TCP_MISS/200 8266426 GET http://192.168.0.1/video_cache/youtube/gvoQO_-CarE.flv?

as you can see ,the video is being retrieved from the video_cache , but it is coming as a miss , is it possible to return it as a HIT.
This way TOS/DSCP will work with youtube
Thanx.

admin's picture
Offline
Joined: Nov 2 2008

Actually redirectors/url rewriters or other squid plugins are not allowed to do set TOS/DSCP. So there is almost nothing that can be done about it. Though I am exploring the possibilities, I have little hope :|

Anonymous2 (not verified)

well, you could use netfilter for that. set TOS/DSCP to everything going out from your local apache port.

admin's picture
Offline
Joined: Nov 2 2008

Hi!

Thanks for the suggestions. I hope this will help people wanting TOS/DSCP :)

Thank You!

Anonymous (not verified)

please any example of using netfilter for a newbie in linux .. its so important to change the tos of hit video file ..

Anonymous (not verified)

whats the (( local apache port. )) ?? is it 80 ??

admin's picture
Offline
Joined: Nov 2 2008

Anon,

Yes, it is 80 by default.

Anonymous (not verified)

so , should i put this in debian IP-table :
iptables –A OUTPUT –t mangle –sp 80 –set-tos 0x30

is this correct for debian ? i think it needs some corrections ..

Offline
Joined: Dec 14 2008

I suggest using a uid/gid match, and not by port.

admin's picture
Offline
Joined: Nov 2 2008

Imriz,

As far as I know, newer kernels doesn't allow matching using uid/gid . Correct me if I am wrong.

Thank You!

Offline
Joined: Dec 14 2008

Uhmm, the iptables man page on a RHEL 5.3 machine indicates it is supported, but I haven't tried that my self.

admin's picture
Offline
Joined: Nov 2 2008

Anon,

I am not good at iptables. May be some other member will help or try asking in some iptables forums.

Thank You!

Anonymous (not verified)

I tried uid/gid , the problem is the packets output from apache is going to squid , its not going out from the output interface to mikrotik directly .. so it wont be marked by matching the uid/gid ..
only the packets out from the interface will be marked , which are coming from squid not apache ..
also tried the port 80 , same thing ..

Offline
Joined: Dec 14 2008

Why would you route the apache through the squid??
If this is a transparent proxy, like in my setup, you should make sure that access to the apache should go directly to the apache and not through squid.

Anonymous (not verified)

well , i dont think its routed through squid , and squid is transparnet also ..
but all packets coming to mikrotik from the cache server are coming from serverIP:squid port .. even cached youtube packets not from serverIP:apache port ..
so that i guess all packets requested by mikrotik should come from the squid port ..
I test if i request somthing directly from apache , yes it's working , easily i can change its DSCP using IP-table output uid=www-data, and mikrotik can recognize it ..
if my conclusion is right , so the question is if a packet come from apache with a specific dscp value , how can we keep this value untill it reaches mikrotik , i mean we dont want squid to change the packets dscp .. may be the reason is that zph is doing this for miss packets ? i mean we have to make zph changes only dscp of hit packets , and leaves the miss packets as it is ..

Offline
Joined: Dec 14 2008

You need an iptables rule to avoid redirecting traffic to the apache into squid. Something like this: iptables -t nat -A PREROUTING -i <yourincominginterface> -s ! <yourserverip> -d ! <yourserverip> -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

Anonymous (not verified)

maybe i should be more clear about my setup :
videocahe + squid installed in single interface server , connected to mikrotik through this interface ..
the request coming from mikrotik to squid:3128 ..
your last example rule is to redirecting every packets coming from the interface , not from squid ip , not going to squid ip , has dst port 80 , to be redirected to port 3128 !!!!
which i cant understand !!!!!!!!!!!!!!

Anonymous (not verified)

yesssss I did it , finally

now any cached video is downloading by clients is in unlimited speed !!!!!!!!!

thanks alot my friends for all of your great suggestions ..

actually i did it by the mikrotik itself , marking the squidIP:80 ..

Anonymous (not verified)

sorry for my bad english

you wrote

"...

yesssss I did it , finally

now any cached video is downloading by clients is in unlimited speed !!!!!!!!!

thanks alot my friends for all of your great suggestions ..

actually i did it by the mikrotik itself , marking the squidIP:80 ..
...."

can you help me ? what is "squidIP:80 --" i need the rule you add in a /ip firewall mangle

thanks.

Jorge Boardman (not verified)

Hi there, You finally made it, !!! Marking connections/packets coming from your SquidIP:80 ... but this way aren't you allowing ALL packets coming from SquidIP:80 at full speed? Even the packets that have not been cached yet or packets that are un-cacheable ... so actually not controlling HTTP bandwidth to your clients... or am I wrong?

admin's picture
Offline
Joined: Nov 2 2008

Jorge,

The traffic squidIP:80 means the HTTP traffic from a webserver running on squid machine. While the other HTTP traffic served to clients is search via squidIP:squidPort and not squidIP:80. So, you are basically not allowing all the traffic at full speed.

Thank You!

Jorge Boardman (not verified)

Thanks for the point, I analyzed these later and certainly you are right.

Regards

JB

My Problem with mikro tik (not verified)

Hi

i have problem with mikrotik i see all reply but i do not understand now how to set mikrotik to listin to cachevideo i have problem with play the video ( An error occurred, please try again later.) in mikrotik only

but in set the proxy:ip and proxy:3128 in firefox it is working good
all file it is caching good

now how to solve this problem Plz Help me for that and thanks for help

sorry for bad english

Offline
Joined: Mar 1 2009

Hi all ...

I'm using Mikrotik for gateway and Videocache + squid + frox in DMZ

It's work !!! file cached is unlimited traffic going to LAN

u can read in forum > support

Thanks

admin's picture
Offline
Joined: Nov 2 2008

Zinhell,

Congrats for the setup. It would be great if you can post your configuration files or steps you followed to configure different things.

Thank You!

Offline
Joined: Oct 3 2009

I tried the squid.ip:80 on my Mikrotik. It does not work! I mean yes you can set unlimited speed for videocache/youtube/youporn/etc.. BUT http downloads Also get unlimited speed because it also uses port 80. I tried to use a download manager and OMG! it is eating up my bandwidth!

Meybe someone have any more ideas?

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <code>
  • Lines and paragraphs break automatically.
  • HTML tags will be transformed to conform to HTML standards.

More information about formatting options

CAPTCHA
Are you a human visitor ?
Image CAPTCHA
Enter the characters (without spaces) shown in the image.

Buy Now

Videocache Bundle (RPM and tar archive) is available. Secure your copy now by clicking the button below.
No. of Servers?
For details, check this page.

Recent comments

Spread it

Thank you for spreading the word!

Who's online

There are currently 0 users and 66 guests online.