TL;DR That proxy does not allow for tunneling. And you have a firewall that parses the HTTP requests, likely to disallow HTTP tunneling altogether. You're pretty much limited to GET and POST.
Since you can resolve DNS, and IPsec VPN on port 53 may be a good alternative.
php proxy is not a standard general proxy. In other words it does not follow (general) proxy standards (HTTP CONNECT or SOCKS), it simply is an HTTP proxy for GET and POST requests. It is not a full HTTP proxy implementing HTTP CONNECT which would allow for tunneling connections and bypassing a firewall.
In the code php proxy uses CURL, more exactly
curl_exec, as follows:
$result = @curl_exec($ch);
// there must have been an error if at this point
$error = sprintf('(%d) %s', curl_errno($ch), curl_error($ch));
throw new \Exception($error);
// we have output waiting in the buffer?
// saves memory I would assume?
$this->output_buffer = null;
Even if you send an HTTP CONNECT the proxy will return to you the response to that and close the connection, which is not how HTTP CONNECT works.
That is not to say that CURL cannot work with HTTP CONNECT, it can, but not through PHP
All that said. You have a stateful firewall that analyses HTTP headers (since it only allows for
/admin/ only). I highly doubt that the firewall will allow you to send an HTTP CONNECT in the first place. In other words, if the firewall rejects this (note the typo):
GET /typo-in-amdin/somehting HTTP/1.1
Then I do not believe it will allow:
CONNECT /admin/somewhere HTTP/1.1
Since it would fail on the same regex match. And since your firewall only allows HTTP through (and parses it) you cannot use other protocols, e.g. VPN on posrt 80.
Extra (more optimistic) note
One thing that strikes me is that you can resolve DNS. Therefore the firewall must allow UDP packets on port 53.
And, unless you are using an internal DNS server (and so the DNS resolution is not passing through the firewall), you can get around the HTTP header limitation by running a VPN in udp mode (IPsec) and "connect" to port 53. That will tunnel your traffic, and will look to the firewall as DNS requests and responses.