开发者

Setting up an IP tunnel for a .NET WCF project

Has anyone tried to tunnel a WCF request from PC A to PC C via PC B? In my case, PC A doesn't have direct access to PC C but PC A and PC C has access to PC B. I Googled a bit and found that WCF doesn't support SOCKS proxies, otherwise this would have been resolved long ago. Can anyone think of a way to tunnel WCF requests? I have been thinking of writing a WCF router but the problem is that I am not sure how to get the router address and the actual destination address in my WCF request. In other words, when I create a WCF proxy I can only set it to point to the router's address but how will the router know to which destination to route to? I could later have a PC D, E and F and I want to be able to select one of them.

If anyone knows of a method, tool, etc. Please let me know.

EDIT: Redefined my question due to people not complet开发者_C百科ely understanding my problem.

Thanks


You can simply add a hostname record to each PC's hosts file.

For instance, on PC A you can add a hostname record "pc-b" that points to the IP address of PC B, and vice versa.

On PC A, add:

192.168.2.1 pc-b

(assuming the IP address is the one above), and on PC B, add:

192.168.2.2 pc-b

(again assuming this is the right IP address of course).

Then each PC can contact the other by the hostname, and they will not try to look up these hostnames via DNS.


The Azure Service Bus is related to WCF and has a sample project called Port Bridge that may solve your issue.

Check the solution out here: https://softwareengineering.stackexchange.com/questions/9652/what-are-some-interesting-uses-of-the-azure-service-bus/9656#9656

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜