<commit_before># node-unblocker

A web proxy for evading corporate or government filters, similar to CGIproxy / PHProxy / Glype but 
written in node.js. All data is processed and relayed to the client on the fly without unnecessary 
buffering.

Any website that the proxy can access can now be reached by the proxy's users.

### The magic part

The script uses "pretty" urls which, besides looking pretty, allow links with relative paths 
to just work without modification. (E.g. `<a href="path/to/file2.html"></a>`) 

In addition to this, links that are relative to the root (E.g. `<a href="/path/to/file2.html"></a>`) 
can be handled without modification by checking the referrer and 302 redirecting them to the proper 
location in the referring site.

Cookies are currently storred in the visitor's session on the server rather than being sent to the 
visitor's browser to avoid having a large number of (possibly conflicting) browser cookies once they
have browsed several sites through the proxy.

## Instalation on your system
Requires [node.js](http://nodejs.org/) >= 0.6 and [Redis](http://redis.io/) for session storage. 
Then download node-unblocker, cd into the directory, and run `npm install -d`. Optionally edit 
config.js then run `node server.js` to start the server. It should spawn a new instance for each CPU 
core you have.

## Installation on Heroku
This project should be runnable on a free [Heroku](http://www.heroku.com/) instance without 
modification - see http://node-unblocker.herokuapp.com/proxy for an example. You will need to run 
`heroku addons:add redistogo` and it would also be wise to run `heroku config:add SECRET=[something 
only you know]` to make the session cookies secure. You may also want to run 
`heroku addons:add piggyback_ssl` to enable secure browsing and/or 
`heroku config:add GA_ID=[your Google Analytics ID, ex: UA-12345-78]` to enable usage tracking via Google 
Analytics. 

## High-level Todo list

* Mini-url form
* Allow for removal of scripts (both <script /> tags and on*= handlers)
* Web interface for managing the blocklist

## License
This project and related problems are released under the terms of the [GNU GPL version 3](http://www.gnu.org/licenses/gpl.html)

## Change log

### v0.6.0 - 2012-2-24
* Added support for node.js 0.6's native clustering
* Removed simple-session library and replaced it with [connect's](https://github.com/senchalabs/connect/) session library backed by a redis store<commit_msg>v0.7.1 change log<commit_after># node-unblocker

A web proxy for evading corporate or government filters, similar to CGIproxy / PHProxy / Glype but 
written in node.js. All data is processed and relayed to the client on the fly without unnecessary 
buffering.

Any website that the proxy can access can now be reached by the proxy's users.

### The magic part

The script uses "pretty" urls which, besides looking pretty, allow links with relative paths 
to just work without modification. (E.g. `<a href="path/to/file2.html"></a>`) 

In addition to this, links that are relative to the root (E.g. `<a href="/path/to/file2.html"></a>`) 
can be handled without modification by checking the referrer and 302 redirecting them to the proper 
location in the referring site.

Cookies are currently storred in the visitor's session on the server rather than being sent to the 
visitor's browser to avoid having a large number of (possibly conflicting) browser cookies once they
have browsed several sites through the proxy.

## Instalation on your system
Requires [node.js](http://nodejs.org/) >= 0.6 and [Redis](http://redis.io/) for session storage. 
Then download node-unblocker, cd into the directory, and run `npm install -d`. Optionally edit 
config.js then run `node server.js` to start the server. It should spawn a new instance for each CPU 
core you have.

## Installation on Heroku
This project should be runnable on a free [Heroku](http://www.heroku.com/) instance without 
modification - see http://node-unblocker.herokuapp.com/proxy for an example. You will need to run 
`heroku addons:add redistogo` and it would also be wise to run `heroku config:add SECRET=[something 
only you know]` to make the session cookies secure. You may also want to run 
`heroku addons:add piggyback_ssl` to enable secure browsing and/or 
`heroku config:add GA_ID=[your Google Analytics ID, ex: UA-12345-78]` to enable usage tracking via Google 
Analytics. 

## High-level Todo list

* Mini-url form
* Allow for removal of scripts (both <script /> tags and on*= handlers)
* Web interface for managing the blocklist

## License
This project and related problems are released under the terms of the [GNU GPL version 3](http://www.gnu.org/licenses/gpl.html)

## Change log

### v0.7.1 - 2012-3-6
* Added GA tracking and and noindex/nofollow meta tags to proxied pages
* Improved status page to show cluster-wide statistics
* Fixed issue #7 to better track concurrent requests

### v0.6.0 - 2012-2-24
* Added support for node.js 0.6's native clustering
* Removed simple-session library and replaced it with [connect's](https://github.com/senchalabs/connect/) session library backed by a redis store
{'fraction_non_alphanumeric': 0.08186226964112513, 'fraction_numerical': 0.012997090203685741, 'mean_word_length': 4.25050916496945, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '438915', 'n_tokens_mistral': 1531, 'n_tokens_neox': 1442, 'n_words': 705}