Zend certified PHP/Magento developer

How do I set up a SOCKS proxy pretending to be an HTTPS website?

I have a machine accessible to the Internet at large on essentially any port. This is machine A and it runs a GNU/Linux-based system.

I also have a machine connected to an internal network somewhere. Outbound connections are only possible via an HTTP(S) proxy. (In fact, you can’t even lookup other hosts’ _IP_addresses_ on this machine…) The is machine B, and it runs either Windows 10 or some GNU/Linux-based system.

Now, I want to be able to connect from B to anywhere on the Internet, on any port.

It seems like a “standard” way of doing this is setting up a SOCKS proxy on machine A; however, my traffic is restricted to HTTP/S ports only, and there may even be some kind of traffic analysis/deep packet inspection to thwart non-HTTPS traffic on that port.

So, can I set up a SOCKS proxy which presents itself as an HTTPS website? At least to the point of encrypting the incoming connection? And – how do I set things up on the client side to use it? (Either a Windows or Linux answer for the client side will do.)

Note: It would be even more beneficial if there would be a redirect of “legitimate” URLs to an actual web server, with SOCKS proxy traffic identified and handled differently. But – it’s not really necessary.