允许 Golang 通过 Windows 防火墙进行测试目的。

huangapple go评论84阅读模式
英文:

Allow golang through Windows firewall for testing purposes

问题

我正在尝试测试一些启动简单TCP服务器并建立连接的Go代码:

net.Listen("tcp", "localhost:8686")

我已经尝试在防火墙应用程序中创建规则,允许所有的TCP连接,无论是入站还是出站的,但是我的测试仍然失败,并且每次运行时都会提示我允许通过防火墙。

英文:

I'm trying to test some go code that starts a simple TCP server and makes a connection using

net.Listen("tcp", "localhost:8686")

I've tried creating rules in the Firewall application to allow all connections, both inbound and outbound, via TCP, but my tests still fail and I'm being prompted to allow it through the firewall each time it runs.

答案1

得分: 2

我刚刚修好了这个问题。显然,我还需要打开UDP端口。

英文:

I actually just fixed this. Apparently I needed to open the UDP ports as well.

huangapple
  • 本文由 发表于 2015年11月1日 05:27:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/33456819.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定