How To Enforce YouTube Safety Mode To Block Objectionable Content With SafeSquid Content Filtering Proxy
How To Enforce YouTube Safety Mode To Block Objectionable Content With SafeSquid Content Filtering ProxyGoogle recently announced 'Safety Mode' for YouTube. When you opt in to Safety Mode, videos containing mature content, objectionable material, or age restrictions will be filtered out of the site's search results. If a user inputs a direct link to a mature video, Safety Mode blocks viewing. You also have the option of 'locking' Safety Mode. When you see the 'Safety Mode' option at the bottom of any YouTube video page, you can choose to opt in to the service and lock that preference with your YouTube account password (you have to be logged in). That setting will be locked until the password is input to change it. It can not be unlocked by any other YouTube account. YouTube Safety Mode has a few problems. Safety Mode is browser based. This means that it will be enabled only on the browser that you used to enable it. If a user accesses YouTube from the same machine, but another browser, Safety Mode will not be applied. It is also not very difficult to bypass Safety Mode. It is cookie based, so all a user needs to do, is delete cookies from YouTube, or all cookies, and it gets disabled. You can 'enforce' Youtube Safety Mode at the Internet Gateway with SafeSquid. Once enforced, it will be applied, irrespective of a users preference settings, or browser used. The procedure to enforce Youtube Safety Mode is quite simple. All you need to do is import the rule snippet to enforce Youtube Safety Mode, available at SafeSquid Downloads website, into your config file, as explained below.
Importing Youtube Safety Mode rule snippet into your config fileTo import the Youtube Safety Mode rule snippet into your config file -
You should get a message - 'File loaded'. Click on Save settings in the Top Menu and save the changes to your config.xml to make it permanent.
Testing Youtube Safety ModeOnce you have imported the rule snippet into your config file and saved settings, open any browser configured to use SafeSquid as proxy, and access youtube.com. Notice that 'Safety Mode is on' is displayed next to the search box. When you try to search for objectionable content, you will see a message in red saying 'The word "porn" has been filtered from the search because Safety Mode is enabled". You do get results, but objectionable content is 'almost' filtered out. You can try disabling Safety Mode by clicking on the 'Safety Mode is on' option at the bottom of the page. You will find that disabling Safety Mode does not have any effect, and it remains enabled.
How it worksWhen you import the rule snippet for enforcing Safety Mode, the following rules are imported into your config file:
The first rule in Profiles section identifies requests made for youtube.com, and adds them a profile UNSAFE_YOUTUBE. The second rule analyzes the 'Request Header Pattern' of the client, to check if a string - PREF= f28000000 exists in cookie being sent to the host. This string will be found, only if the client has opted for Safety Mode. If the string is found, this rule removes the profile UNSAFE_YOUTUBE from the request, and adds a profile SAFE_YOUTUBE to it, and the request is forwarded to the host. If the string is not found, the request still carries the UNSAFE_YOUTUBE profile. The rule under Rewrite document section acts upon such requests, and inserts the string in the cookie section of the client request headers, and forwards the request to the host. So effectively, all requests that are sent to the host, i.e. youtube.com, carry the 'Safety Mode Enabled' preference string. This makes youtube serve only filtered results to the client. Download: You can download SafeSquid free editions from here. Also see: Other tutorials for SafeSquid
|






![Creative Commons Attribution License [Creative Commons Attribution License]](http://creativecommons.org/images/public/somerights20.gif)


Recent comments
6 hours 57 min ago
11 hours 46 min ago
16 hours 35 min ago
18 hours 55 min ago
19 hours 12 min ago
19 hours 23 min ago
23 hours 25 min ago
1 day 10 min ago
1 day 2 hours ago
1 day 9 hours ago