From ebb9bc4eddda5ffd3b2bc8720fdae6cae8cc1554 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Tue, 22 Jul 2025 03:11:23 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stuncheck/stuncheck.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stuncheck/stuncheck.go b/stuncheck/stuncheck.go index 9f6135a..fb47825 100644 --- a/stuncheck/stuncheck.go +++ b/stuncheck/stuncheck.go @@ -57,7 +57,7 @@ func getNetworkType(addrStr string) string { return "udp4" } -func MappingTests(addrStr string) error { +func MappingTests(addrStr string) error { //nolint:cyclop mapTestConn, err := connect(addrStr) if err != nil { if model.EnableLoger { @@ -144,7 +144,7 @@ func MappingTests(addrStr string) error { return mapTestConn.Close() } -func FilteringTests(addrStr string) error { +func FilteringTests(addrStr string) error { //nolint:cyclop mapTestConn, err := connect(addrStr) if err != nil { if model.EnableLoger { @@ -257,7 +257,7 @@ func parse(msg *stun.Message) (ret struct { stun.AttrResponseOrigin, stun.AttrMappedAddress, stun.AttrSoftware: - break + break //nolint:staticcheck default: if model.EnableLoger { model.Log.Debugf("\t%v (l=%v)", attr, attr.Length) @@ -326,6 +326,7 @@ func (c *stunServerConn) roundTrip(msg *stun.Message, addr net.Addr) (*stun.Mess } } +// taken from https://github.com/pion/stun/blob/master/cmd/stun-traversal/main.go func listen(conn *net.UDPConn) (messages chan *stun.Message) { messages = make(chan *stun.Message) go func() {