简体   繁体   中英

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.

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.

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.

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.

See: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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