jenssegers / php-proxy

A PHP proxy script with https and post support
https://jenssegers.com
933 stars 266 forks source link

Does php-proxy parse an incoming CONNECT header in a TLS request? #50

Closed halfer closed 7 years ago

halfer commented 7 years ago

I'm using 2.2.1 of php-proxy and have successfully set up the demo script (in the README for that version) to proxy an incoming request. I've used the built-in PHP web server for now, and that works fine.

However I'd like to support HTTPS as well, and am not sure how to go about it. I understand that a client will send a CONNECT request (see here) and I assume the body following the initial headers should be sent verbatim to the target server (presumably because it is encrypted by the client).

I was hoping that "https support" meant that this library would be able to parse incoming HTTPS, but does it just mean that it can make outgoing HTTPS requests? If so, and thus if this library is not suitable for my use case, any ideas what library I might use?

halfer commented 7 years ago

I've found an alternate approach for my needs, and decided that supporting CONNECT was not suitable anyway, as I want to record and playback requests.