Athlon1600 / php-proxy

A web proxy script written in PHP and built as an alternative to Glype.
https://www.php-proxy.com
MIT License
295 stars 158 forks source link

Block All Websites Except Some? #140

Closed bionichuman closed 4 years ago

bionichuman commented 5 years ago

Is it possible to Block All Websites Except Some? Like stop people from being able to use the proxy for example.com but allow google.com?

I used this but it blocked scripts and sub domains too.

// decode q parameter to get the real URL $url = url_decrypt($_GET['q']); if(!preg_match('/(cnn.com)|(facebook.com)/', $url)){ exit; } $proxy = new Proxy();

Athlon1600 commented 4 years ago

use this:
https://github.com/Athlon1600/php-proxy/blob/master/src/Plugin/BlockListPlugin.php