I tested Mini Proxy but it showed a complete blank page when I tried viewing https pages. I was told to add these 2 lines after "$ch = curl_init();" and it worked and I am able to view https pages on my web proxy.
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
However reading a little bit more on cURL, I realize that, those 2 lines are risky as my web proxy would not verify the SSL certificates.
Q1. And so, what steps to follow and what lines of codes to add so that my web proxy verifies the SSL certificates using all the CAs that all modern browsers use to verify certificates and digital signatures ? What must I do now to add the certificate verification feature ?
Q2. I need to add a bad words filter so if a user tries viewing webpages that contain the bad words in it's content, then the web proxy must not load the webpage but must echo error instead. I will try writing and adding the filter if I can be sure to which line I should add the filter. Currently, I am stuck to which line it should be added on the Mini Proxy.
Mini Proxy's source code by Jost Dick, can be found on the following link from where I downloaded it: https://github.com/joshdick/miniProxy/blob/master/miniProxy.php
Can someone be kind enough to let me know on which line I should add the bad words filter and which variable I should be adding the filter on ?