Check out https://github.com/Arno0x/PowerShellScripts
Specifically proxyTunnel.ps1
Tunnel in a "tunnel" scenario...
Update:
If you edit the script you can use it with "oneclick" (right click > run with powershell), what you have to edit are 3 lines (4, if localhost is not suitable):
[String]$bindIP = "127.0.0.1", #localhost
[Int]$bindPort = 5555, #local port
[String]$destHost = "destination.host.name", #or IP address
[Int]$destPort = 443 #destination port
After script startup powershell will listen on port 5555, so you can configure putty to connect to localhost:5555, and powershell will proxy the packets to the destination. Of course you will have to experiment with ports, connection types, not all might allowed through the proxy.
In my case there is a squid proxy with kerberos authentication only, but powershell does the job just fine. At the destination I have a mikrotik router with ssh configured to port 443, but any other ssh server would work.
One thing I noticed so far (I discovered the script only yesterday) is that it will not revert to the listening state, so putty will not reconnect upon disconnect.
Of course, powershell is a Windows thing, so works only there...
@billc.cn - any easy way to verify if the connect extension is enabled or not? – d-b – 2015-11-24T12:40:59.813
@user23122 A proxy that supoorts HTTPS would have it enabled, but it may still limit connecting to ports other than 443. – billc.cn – 2015-11-25T11:23:33.817
I'm behind a http, without s, proxy. How do I determine it in this case? – d-b – 2015-11-25T12:14:46.650
I was going to localhost (the machine at the other end of the proxy chain) and even though
Exclude hosts
was empty, I did need to checkConsider proxying local host
in case that's anyone else' issue as well – Hashbrown – 2019-08-31T06:45:49.187You HTTP proxy must have the connect command enabled to use non-http protocols. – billc.cn – 2011-10-28T13:31:18.097
Do I get you right. It works with your iPad over the same proxy? – gabe – 2011-10-28T13:36:57.623
@gabe, no, my iPad is using the 3G connection, so no Proxy. – Michiel – 2011-10-28T13:41:15.870
1@billc.cn, what do you mean? – Michiel – 2011-10-28T13:41:32.627
A HTTP proxy by default can only relay http traffic. However, an extension in the standard (the CONNECT verb) allows the proxy server to connect to arbitrary port with arbitrary protocol. Because there's a risk that this connect feature is misused, it's not enabled on all HTTP proxies. You have to check with your admin if connect is allowed or ask for a SOCKS proxy. – billc.cn – 2011-10-28T15:22:47.333