Ezekiel
09-22-2007, 07:10 PM
Currently, I run Apache on my home computer for various purposes (mainly to share files); I'll eventually use it for a lot more. This is for personal/school stuff -- not really intended to be associated with any of my online aliases. I run it on a non-standard port and only forward it in my router's settings when needed.
I recently decided to host a web-proxy from my machine, so I can browse my favourite sites when I'm bored (or have finished all the work) at school. They have really strict filtering and route everything through their own internal proxy, so I think only HTTP traffic is allowed. Thus, a web-proxy is the solution.
The problem is, they block sites based on words in addition to the standard stuff. It's not a matter of certain domains being blocked -- if any 'un-educational' text is found, access is denied.
The first thought I had was to set up SSL on Apache so they can't monitor my requested pages, but I'm too lazy to do that right now (I forgot how I did it before...) and I'm not sure their network would allow SSL connections on my weird port.
After all this contemplating, I concluded that I would modify PHProxy (the proxy web-app) to get around this word-filtering shit.
My intention is to put a space between every character in the text of every page requested by the user (but leaving HTML tags intact). I may eventually find a character to replace the space that is suitably invisible, but it's fine for the moment.
How will this beat the filter? If every word has a space between every character, their filters can't recognise it.
So far I've found the correct parts to edit in PHProxy's scripts, and here's one of my modified output lines (with the regex I came up with):
echo preg_replace("/(>.*)(.)(.*<)/g", "$* $2 $*", $PHProxy->return_response());
It only puts the spaces once in each whole block of text (as defined by the space between HTML end tags and start tags). This is useless -- I want spaces between every character!
I know there is a simple solution to this, but I'm too tired and I've neglected regexes during my time on the net.
I recently decided to host a web-proxy from my machine, so I can browse my favourite sites when I'm bored (or have finished all the work) at school. They have really strict filtering and route everything through their own internal proxy, so I think only HTTP traffic is allowed. Thus, a web-proxy is the solution.
The problem is, they block sites based on words in addition to the standard stuff. It's not a matter of certain domains being blocked -- if any 'un-educational' text is found, access is denied.
The first thought I had was to set up SSL on Apache so they can't monitor my requested pages, but I'm too lazy to do that right now (I forgot how I did it before...) and I'm not sure their network would allow SSL connections on my weird port.
After all this contemplating, I concluded that I would modify PHProxy (the proxy web-app) to get around this word-filtering shit.
My intention is to put a space between every character in the text of every page requested by the user (but leaving HTML tags intact). I may eventually find a character to replace the space that is suitably invisible, but it's fine for the moment.
How will this beat the filter? If every word has a space between every character, their filters can't recognise it.
So far I've found the correct parts to edit in PHProxy's scripts, and here's one of my modified output lines (with the regex I came up with):
echo preg_replace("/(>.*)(.)(.*<)/g", "$* $2 $*", $PHProxy->return_response());
It only puts the spaces once in each whole block of text (as defined by the space between HTML end tags and start tags). This is useless -- I want spaces between every character!
I know there is a simple solution to this, but I'm too tired and I've neglected regexes during my time on the net.