Does anyone know of a PHP script that runs as a proxy server (WITHOUT using a web server like Apache)? I am looking for a PHP based one so I can edit/modify the traffic that goes through it (for security reasons). The closest thing I've found is philtron (http://philtron.sourceforge.net/), but this seems to be an outdated project and no longer works with PHP5.
I'm not a big PHP expert and I'm sure one can implement webs server in PHP but that's not how it is done. If you don't want to use Apache try using nginx
(lightweight, easy to change, etc).
Nevertheless I think your requirements are weird. It's like saying you want to write an HTML page in Assembly language. Doable but not the best way. If you need something like a proxy that can sniff on traffic you should use haproxy
and modify it to your needs.
CONNECT
support. The latter looks much more stable and tested, but I am guessing it cannot run as an HTTPS proxy. – halfer Mar 28 '17 at 11:48