创建通过防火墙可见的本地服务器 [英] Creating a local server visible through firewalls

查看:92
本文介绍了创建通过防火墙可见的本地服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用C ++编写的本地服务器,使用纯套接字:: accept()和UDP recvfrom()侦听入站TCP连接.我有两个要解决的问题:

I have a local server written in C++ listening to inbound TCP connects using plain socket ::accept() and UDP recvfrom(). I have two problems with this that I wish to solve:

  • 我可以通过编程方式使Windows让我打开接受套接字,而不会自动被Windows(软件)防火墙阻止吗?
  • 我是否可以使用任何允许我的数据包通过Windows防火墙和外部防火墙的端口? 80端口通常由 Skype 占用,但是还有其他端口吗?默认情况下,大多数外部防火墙通常是否会默认在端口80上允许传入的UDP和TCP连接?
  • Can I programatically make Windows let me open the accept socket without it automatically being blocked by the Windows (software) firewall?
  • Are there any ports I can use that will allow my packets to pass through both Windows firewall and external firewall? Port 80 is often taken by things like Skype, but are there others? Will most external firewalls typically by default allow incoming UDP and TCP connects on port 80?

谢谢!

推荐答案

您可能想看看更有利于桌面环境的内容,例如 STUN 或XMPP之类的覆盖网络.

You probably want to look at something more conducive to desktop environments such NAT traversal techniques as libjingle, STUN, or an overlay network such as XMPP.

这篇关于创建通过防火墙可见的本地服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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