开始使用http隧道 [英] getting started with http tunneling

查看:228
本文介绍了开始使用http隧道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将很快开始在不同的机器上运行并通过网络进行通信的软件。我希望通信使用HTTP隧道,所以没有防火墙端口需要由用户打开。

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.

这个软件将用C ++编写。我的问题是我真的不知道从哪里开始寻找有关实现HTTP隧道的资源。

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.

我相信我可以使用WCF这 - 听起来像一个好理念?

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

推荐答案

使用类似WCF的优点在于通过某些路由器都为您处理。我正在谈论一些路由器的深度包检测,如果它看起来不像干净的HTML,它将识别你发送的材料为不可接受。

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.

另一方面,在C ++中使用WCF可能很有趣。大概这意味着你愿意编写代码作为C ++ / CLI。

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

仍然,我想你会发现,你选择的网络框架是较小的问题。 Moreso你的网络控制逻辑会消耗你的时间。如果您正在进行任何数量的异步网络通信,请确保您接受了良好的教育,使用良好的状态机工具。还请注意 C#端口

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.

ps如果您不使用托管客户端与WCF,请记住您的邮件必须按字母顺序与XML属性/属性序列化。否则你会得到莫名其妙的错误。如果我记得,空也必须明确发送。

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.

这篇关于开始使用http隧道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆