简体   繁体   English

如何“桥接”来自连接到C#代理类型服务器的两个客户端的VNC通信?

[英]How can I “bridge” VNC traffic from two clients connected to a C# proxy-type server?

I'm looking to develop an asynchronous C# TCP server which can act as a proxy between two client VNC connections, passing data between the two transparently. 我正在寻求开发一个异步C#TCP服务器,该服务器可以充当两个客户端VNC连接之间的代理,从而在两个之间透明地传递数据。

I've already got some asynchronous client-server code set up where I can effectively communicate messages between the server & any connected clients, now I need a way to host a kind of proxy for VNC traffic. 我已经设置了一些异步客户端-服务器代码,可以在服务器与任何连接的客户端之间有效地传递消息,现在,我需要一种托管VNC通信代理的方法。

Client A--------------Server--------------Client B
 VNC traffic sent -> relayed through server -> VNC traffic received

And then any response from client B to simply flow back to the server, then transitively to client A. 然后,来自客户端B的任何响应都会简单地流回到服务器,然后传递到客户端A。

If any more information is required for a proper answer, please do let me know. 如果需要更多信息以获取正确答案,请告诉我。

Thanks! 谢谢!

I managed to get this answered on Server Fault...the key is to launch "socat" from your application and use it to "link" the connections together. 我设法在Server Fault上得到了答复……关键是要从您的应用程序启动“ socat”并将其“链接”在一起。

See: https://serverfault.com/questions/254855/socat-connect-connect-proxy-two-inbound-tcp-connections-to-expose-a-firewalled 参见: https : //serverfault.com/questions/254855/socat-connect-connect-proxy-two-inbound-tcp-connections-to-expose-a-firewalled

For more information. 欲获得更多信息。

You say that you already can receive data on the server that is sent from the client - you just write exactly what you read from one client back out to the other connected client. 您说您已经可以在服务器上接收从客户端发送的数据-您只需将从一个客户端读取的内容准确地写回另一个连接的客户端即可。

It seems like you've already done the hard work, and I'm confused as to what part you're not understanding on how to finish it up. 看来您已经完成了艰苦的工作,但是对于您不了解该如何完成的部分,我感到困惑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM