getting started with http tunneling

萝らか妹 提交于 2019-12-10 23:16:01

问题


I will soon start work on software which runs on different machines and communicates over the network. I'd like the communication to happen using HTTP tunneling, so no firewall ports need to be opened by the user.

This software will be written in C++. My problem is I don't really know where to start looking for resources regarding implementing HTTP tunneling.

I believe I could use WCF for this - does that sound like a good idea? Any pros/cons of going that route?


回答1:


The advantage of using something like WCF is that anomolies of "passing through" some routers are all handled for you. I'm talking about deep-packet inspection that some routers have, that will identify material you send as "not acceptable" if it doesn't look like clean HTML.

On the other hand, working with WCF in C++ might be interesting. Presumably this means you are willing to write code as C++/CLI.

Still, I think you will find that your choice of a networking framework is the lesser issue. Moreso you network control logic will consume your time. If you are doing any amount of asynchronous network communications, be sure you are well-educated with a good state-machine tool. Notice also the C# port.

p.s. If you are not using managed clients with WCF, just remember that your messages must be serialized with XML properties/attributes in alphabetical order. You'll get inexplicable errors otherwise. Nulls must be sent explicitly too, if I recall.



来源:https://stackoverflow.com/questions/3633118/getting-started-with-http-tunneling

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