Results 1 to 10 of 10

Thread: How to configure Squid to forward .flv files on the fly?

  1. #1
    Join Date
    Apr 2009
    Location
    Rawalpindi, Pakistan
    Beans
    5,669
    Distro
    Ubuntu Gnome Development Release

    How to configure Squid to forward .flv files on the fly?

    Hello community!

    I am using Squid Proxy Server alongwith Dansguardian, dhcp3 and ClamAV on my local network. Everything is working fine except for .flv files like www.youtube.com. The problem is that Squid wants to download the whole .flv file first to its cache and then serve it to the client.

    It has an advantage that the whole video loads at once on the client's browser but that is not what our users want.

    What they want is that these files load on the fly as they do on a normal internet connection. How do I configure squid to serve .flv files on the fly to the client PCs?

    Regards.

    Sikander.

  2. #2
    Join Date
    Mar 2008
    Location
    Las Vegas
    Beans
    1,148

    Re: How to configure Squid to forward .flv files on the fly?

    Try the always_direct directive. The docs and a few examples are here.

    HTH,
    Barrie
    Last edited by Barriehie; March 6th, 2010 at 04:10 AM.
    Debian Stable
    FluxBox
    Mark Your Thread Solved

  3. #3
    Join Date
    Apr 2009
    Location
    Rawalpindi, Pakistan
    Beans
    5,669
    Distro
    Ubuntu Gnome Development Release

    Re: How to configure Squid to forward .flv files on the fly?

    Quote Originally Posted by Barriehie View Post
    Try the always_direct directive. The docs and a few examples are here.

    HTH,
    Barrie
    Thanks for the reply.

    I have looked at your link and have google "always_direct directive" but couldn't get it working. Actually I am new at squid. Can you kindly give some examples about streaming all the .flv files or will I have to add all the web addresses manually as the page you linked states?

    Regards.

  4. #4
    Join Date
    Mar 2008
    Location
    Las Vegas
    Beans
    1,148

    Re: How to configure Squid to forward .flv files on the fly?

    Quote Originally Posted by sikander3786 View Post
    Thanks for the reply.

    I have looked at your link and have google "always_direct directive" but couldn't get it working. Actually I am new at squid. Can you kindly give some examples about streaming all the .flv files or will I have to add all the web addresses manually as the page you linked states?

    Regards.
    Don't know what problem you're having. It worked on this end when I man an acl with www.youtube.com in it and then:
    Code:
    acl acl_name dstdomain "path/acl_name"
    always_direct allow acl_name
    Debian Stable
    FluxBox
    Mark Your Thread Solved

  5. #5
    Join Date
    Apr 2009
    Location
    Rawalpindi, Pakistan
    Beans
    5,669
    Distro
    Ubuntu Gnome Development Release

    Re: How to configure Squid to forward .flv files on the fly?

    Quote Originally Posted by Barriehie View Post
    Don't know what problem you're having. It worked on this end when I man an acl with www.youtube.com in it and then:
    Code:
    acl acl_name dstdomain "path/acl_name"
    always_direct allow acl_name
    I've added the following line to squid.conf but it didn't work.

    Code:
    acl youtube dstdomain www.youtube.com
    always_direct allow youtube
    What do you think is going bad?

  6. #6
    Join Date
    Mar 2008
    Location
    Las Vegas
    Beans
    1,148

    Re: How to configure Squid to forward .flv files on the fly?

    What does your log file say???
    Debian Stable
    FluxBox
    Mark Your Thread Solved

  7. #7
    Join Date
    Apr 2009
    Location
    Rawalpindi, Pakistan
    Beans
    5,669
    Distro
    Ubuntu Gnome Development Release

    Re: How to configure Squid to forward .flv files on the fly?

    Quote Originally Posted by Barriehie View Post
    What does your log file say???
    It states

    1268071910.250 204870 127.0.0.1 TCP_MISS/200 5693601 GET http://v13.lscache4.c.youtube.com/videoplayback? - DIRECT/74.125.101.29 video/x-flv

    Is this what you were asking for?

  8. #8
    Join Date
    Mar 2008
    Location
    Las Vegas
    Beans
    1,148

    Re: How to configure Squid to forward .flv files on the fly?

    Quote Originally Posted by sikander3786 View Post
    I've added the following line to squid.conf but it didn't work.

    Code:
    acl youtube dstdomain www.youtube.com
    always_direct allow youtube
    What do you think is going bad?
    Where you have www.youtube.com has to be enclosed in quotes and a full path, i.e. my acl's are in ~/squid so I've got:
    Code:
    acl blacklist-domains dstdomain "/home/barrie/squid/domains"
    For the sake of readability I would change the acl name to my-always-direct or something indicative of what you're doing; might make it easier a year from now when you choose to change something!
    Debian Stable
    FluxBox
    Mark Your Thread Solved

  9. #9
    Join Date
    Apr 2009
    Location
    Rawalpindi, Pakistan
    Beans
    5,669
    Distro
    Ubuntu Gnome Development Release

    Re: How to configure Squid to forward .flv files on the fly?

    Thanks a lot buddy. That worked like a charm.

    Now I can add all the website addresses in /home/malik/squid/domains file and they will follow always_direct rule.

    Thank you.

  10. #10
    Join Date
    Mar 2008
    Location
    Las Vegas
    Beans
    1,148

    Re: How to configure Squid to forward .flv files on the fly?

    Glad you got it working!
    Debian Stable
    FluxBox
    Mark Your Thread Solved

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •