RDP through TCP Proxy

浪尽此生 提交于 2021-02-19 05:13:29

问题


First time in Stackoverflow and I'm hoping someone can help me.

I'm looking at a proof of concept to pass RDP traffic through a TCP Proxy/tunnel which will pass through firewalls using HTTPS.

The problem has to do with deploying images to machines and so it can't be assumed that the .NET framework will be present, so C++ is being used at the deployment end of a connection.

The basic system I have at present is a program which listens for client connections on a port then passes any data to a WCF service which stores it as a byte array. A deployment machine (using GSoap and C++) polls the WCF service for messages and if it finds them then passes the data onto the target server process via sockets. I know this sounds horrible, but it works for simple test clients and server passing data to and from simple test client and server programs via this WCF/C++/C# proxy layer.

But I have to support traffic from RDP, VNC and possibly others, so I need a transparent proxy to do this and am wondering whether the above approach is worth pursuing. I've read up on SSH tunneling and that seems a possibility. My basic question is is it possible to tunnel RDP traffic over HTTPS using custom code.

Thanks John


回答1:


Port Bridge

This project allows several NAT'ed servers to access several NAT'ed clients across the internet over a single service bus connection.

alt text

It's a pretty smart implementation that will really get you thinking. Below is the source

http://blogs.msdn.com/b/clemensv/archive/2009/11/18/port-bridge.aspx

... and another explanation of the same.

http://brentdacodemonkey.wordpress.com/2010/05/05/azure-appfabric-%e2%80%93-a-bridge-going-anywhere/

Also, there is a related project called "SocketShifter" on codeplex: http://socketshifter.codeplex.com/ Although the codeplex site advises using portbridge, I do see recent check ins (Aug 2010) and not sure which one is more up-to-date. It may be worth investigating.




回答2:


A very easy solution is to use socat as described here:

http://opentechnotes.blogspot.com.au/2015/03/how-to-rdesktop-over-http-proxy.html

Tested and working flawlessly over my company's proxy.

The details are for linux but you can download a version of socat compiled for Windows and the process would be the same.




回答3:


While I have not coded a solution to this, someone else has. I use FreeCap every day to connect via RDP through an HTTP proxy.

The full source code is available (looks to be Delphi, but you can extrapolate the pertinent parts). Be aware, though, it's licensed under the GPL.




回答4:


RD Gateway may meet your requirements?

http://technet.microsoft.com/en-us/library/cc772387.aspx



来源:https://stackoverflow.com/questions/1821220/rdp-through-tcp-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!