Allowing a single YouTube video through a ProxySG


<< Back to Knowledge Search

Solution

Overview

How do I allow a single YouTube video through my ProxySG?
My company does not allow YouTube or streaming media.  However, there is one video we want our users to view.  How do I allow that one video through while denying all other YouTube content?

Cause
Resolution

The ProxySG can be configured to allow a single YouTube video to pass through the proxy while blocking all other YouTube content.  This policy can be created and placed into the local policy file.  For information on how to install the CPL policy into the local policy file, please see 000010101 for information on how to install policy into the local policy file.  The following example uses a Blue Coat corporate video located at http://www.youtube.com/watch?v=snkEXxCwpMA

<proxy>
url.domain=//c.youtube.com/ allow
url.domain=//ytimg.com/ allow         ; This is a YouTube content host URL
url.substring=snkEXxCwpMA allow       ; This allows only the unique youtube video. This string is what comes after /watch?v= in the YouTube video URL.
url.substring=googlevideo.com allow   ; This is another YouTube content host URL
url.domain=youtube.com Deny           ; This rule will deny access to other youtube URLs.

<proxy>
url.domain=www.youtube.com http.method=CONNECT ALLOW  
  ;This rule allows users to access the YouTube site's initial request on explicit Proxies. 


NOTE: To allow another youtube video, just add a new line in the CPL code above the first URL.substring rule to allow it, .e.g if we want to allow youtube video https://www.youtube.com/watch?v=VphNtkJYWz0 in addition to the above video, the CPL code becomes:

<proxy>
url.domain=//c.youtube.com/ allow
url.domain=//ytimg.com/ allow
url.substring=snkEXxCwpMA allow
url.substring=VphNtkJYWz0 allow       ; new line added
url.substring=googlevideo.com allow
url.domain=youtube.com Deny

<proxy>
url.domain=www.youtube.com http.method=CONNECT ALLOW


In some cases, a YouTube video is embedded within another URL.  Assuming the URL hosting the embedded video is allowed by policy, but the video is denied based on your YouTube or streaming video deny rule, you can edit the above local policy slightly to allow the embedded video:

<proxy>
url.domain=//c.youtube.com/ allow
url.domain=//ytimg.com/ allow
url.substring=snkEXxCwpMA allow
url.substring=crossdomain.xml allow   ; Allow video to play from domain other than youtube.com
url.substring=googlevideo.com allow
url.domain=youtube.com Deny

<proxy>
url.domain=www.youtube.com http.method=CONNECT ALLOW

 

NOTE: Youtube.com is available via HTTP and HTTPS, though on most modern browsers, it defaults to HTTPS. As a result, SSL Interception must be enabled for the above CPL code to function in all cases.

Workaround
Additional Information
Bug Number
InQuira Doc IdKB3710
Attachment

Article Feedback

Hide Properties
First Published      10/01/2014
Last Modified      03/17/2015
Last Published      03/17/2015
Article Audience
Product      ProxySG
Software      SGOS 5
Topic      Content Access, Content Filtering, Content Management, Control, Policy Management, Streaming
Article Number      000007861
Summary     
Was this helpful?
Comments:
 
Previous MonthNext Month
SunMonTueWedThuFriSat