Giter VIP home page Giter VIP logo

stun's Introduction


Pion STUN

A Go implementation of STUN

Pion stun Slack Widget
GitHub Workflow Status Go Reference Coverage Status Go Report Card License: MIT


Package stun implements Session Traversal Utilities for NAT (STUN) (RFC 5389) protocol and client with no external dependencies and zero allocations in hot paths. Client supports automatic request retransmissions.

Example

You can get your current IP address from any STUN server by sending binding request. See more idiomatic example at cmd/stun-client.

package main

import (
	"fmt"

	"github.com/pion/stun"
)

func main() {
	// Parse a STUN URI
	u, err := stun.ParseURI("stun:stun.l.google.com:19302")
	if err != nil {
		panic(err)
	}

	// Creating a "connection" to STUN server.
	c, err := stun.DialURI(u, &stun.DialConfig{})
	if err != nil {
		panic(err)
	}
	// Building binding request with random transaction id.
	message := stun.MustBuild(stun.TransactionID, stun.BindingRequest)
	// Sending request to STUN server, waiting for response message.
	if err := c.Do(message, func(res stun.Event) {
		if res.Error != nil {
			panic(res.Error)
		}
		// Decoding XOR-MAPPED-ADDRESS attribute from message.
		var xorAddr stun.XORMappedAddress
		if err := xorAddr.GetFrom(res.Message); err != nil {
			panic(err)
		}
		fmt.Println("your IP is", xorAddr.IP)
	}); err != nil {
		panic(err)
	}
}

RFCs

Implemented

Planned

Compatability notes

RFC 5389 obsoletes RFC 3489, so implementation was ignored by purpose, however, RFC 3489 can be easily implemented as separate package.

Stability

Package is currently stable, no backward incompatible changes are expected with exception of critical bugs or security fixes.

Additional attributes are unlikely to be implemented in scope of stun package, the only exception is constants for attribute or message types.

Requirements

Go 1.12 is currently supported and tested in CI.

Testing

Client behavior is tested and verified in many ways:

  • End-To-End with long-term credentials
    • coturn: The coturn server (linux)
  • Bunch of code static checkers (linters)
  • Standard unit-tests with coverage reporting (linux {amd64, arm64}, windows and darwin)
  • Explicit API backward compatibility check, see api directory

See TeamCity project and e2e directory for more information. Also the Wireshark .pcap files are available for e2e test in artifacts for build.

Benchmarks

Intel(R) Core(TM) i7-8700K:

version: 1.22.2
goos: linux
goarch: amd64
pkg: github.com/pion/stun
PASS
benchmark                                         iter       time/iter      throughput   bytes alloc        allocs
---------                                         ----       ---------      ----------   -----------        ------
BenchmarkMappedAddress_AddTo-12               32489450     38.30 ns/op                        0 B/op   0 allocs/op
BenchmarkAlternateServer_AddTo-12             31230991     39.00 ns/op                        0 B/op   0 allocs/op
BenchmarkAgent_GC-12                            431390   2918.00 ns/op                        0 B/op   0 allocs/op
BenchmarkAgent_Process-12                     35901940     36.20 ns/op                        0 B/op   0 allocs/op
BenchmarkMessage_GetNotFound-12              242004358      5.19 ns/op                        0 B/op   0 allocs/op
BenchmarkMessage_Get-12                      230520343      5.21 ns/op                        0 B/op   0 allocs/op
BenchmarkClient_Do-12                          1282231    943.00 ns/op                        0 B/op   0 allocs/op
BenchmarkErrorCode_AddTo-12                   16318916     75.50 ns/op                        0 B/op   0 allocs/op
BenchmarkErrorCodeAttribute_AddTo-12          21584140     54.80 ns/op                        0 B/op   0 allocs/op
BenchmarkErrorCodeAttribute_GetFrom-12       100000000     11.10 ns/op                        0 B/op   0 allocs/op
BenchmarkFingerprint_AddTo-12                 19368768     64.00 ns/op     687.81 MB/s        0 B/op   0 allocs/op
BenchmarkFingerprint_Check-12                 24167007     49.10 ns/op    1057.99 MB/s        0 B/op   0 allocs/op
BenchmarkBuildOverhead/Build-12                5486252    224.00 ns/op                        0 B/op   0 allocs/op
BenchmarkBuildOverhead/BuildNonPointer-12      2496544    517.00 ns/op                      100 B/op   4 allocs/op
BenchmarkBuildOverhead/Raw-12                  6652118    181.00 ns/op                        0 B/op   0 allocs/op
BenchmarkMessage_ForEach-12                   28254212     35.90 ns/op                        0 B/op   0 allocs/op
BenchmarkMessageIntegrity_AddTo-12             1000000   1179.00 ns/op      16.96 MB/s        0 B/op   0 allocs/op
BenchmarkMessageIntegrity_Check-12              975954   1219.00 ns/op      26.24 MB/s        0 B/op   0 allocs/op
BenchmarkMessage_Write-12                     41040598     30.40 ns/op     922.13 MB/s        0 B/op   0 allocs/op
BenchmarkMessageType_Value-12               1000000000      0.53 ns/op                        0 B/op   0 allocs/op
BenchmarkMessage_WriteTo-12                   94942935     11.30 ns/op                        0 B/op   0 allocs/op
BenchmarkMessage_ReadFrom-12                  43437718     29.30 ns/op     682.87 MB/s        0 B/op   0 allocs/op
BenchmarkMessage_ReadBytes-12                 74693397     15.90 ns/op    1257.42 MB/s        0 B/op   0 allocs/op
BenchmarkIsMessage-12                       1000000000      1.20 ns/op   16653.64 MB/s        0 B/op   0 allocs/op
BenchmarkMessage_NewTransactionID-12            521121   2450.00 ns/op                        0 B/op   0 allocs/op
BenchmarkMessageFull-12                        5389495    221.00 ns/op                        0 B/op   0 allocs/op
BenchmarkMessageFullHardcore-12               12715876     94.40 ns/op                        0 B/op   0 allocs/op
BenchmarkMessage_WriteHeader-12              100000000     11.60 ns/op                        0 B/op   0 allocs/op
BenchmarkMessage_CloneTo-12                   30199020     41.80 ns/op    1626.66 MB/s        0 B/op   0 allocs/op
BenchmarkMessage_AddTo-12                    415257625      2.97 ns/op                        0 B/op   0 allocs/op
BenchmarkDecode-12                            49573747     23.60 ns/op                        0 B/op   0 allocs/op
BenchmarkUsername_AddTo-12                    56282674     22.50 ns/op                        0 B/op   0 allocs/op
BenchmarkUsername_GetFrom-12                 100000000     10.10 ns/op                        0 B/op   0 allocs/op
BenchmarkNonce_AddTo-12                       39419097     35.80 ns/op                        0 B/op   0 allocs/op
BenchmarkNonce_AddTo_BadLength-12            196291666      6.04 ns/op                        0 B/op   0 allocs/op
BenchmarkNonce_GetFrom-12                    120857732      9.93 ns/op                        0 B/op   0 allocs/op
BenchmarkUnknownAttributes/AddTo-12           28881430     37.20 ns/op                        0 B/op   0 allocs/op
BenchmarkUnknownAttributes/GetFrom-12         64907534     19.80 ns/op                        0 B/op   0 allocs/op
BenchmarkXOR-12                               32868506     32.20 ns/op   31836.66 MB/s
BenchmarkXORSafe-12                            5185776    234.00 ns/op    4378.74 MB/s
BenchmarkXORFast-12                           30975679     32.50 ns/op   31525.28 MB/s
BenchmarkXORMappedAddress_AddTo-12            21518028     54.50 ns/op                        0 B/op   0 allocs/op
BenchmarkXORMappedAddress_GetFrom-12          35597667     34.40 ns/op                        0 B/op   0 allocs/op
ok      github.com/pion/stun   60.973s

Roadmap

The library is used as a part of our WebRTC implementation. Please refer to that roadmap to track our major milestones.

Community

Pion has an active community on the Slack.

Follow the Pion Twitter for project updates and important WebRTC news.

We are always looking to support your projects. Please reach out if you have something to build! If you need commercial support or don't want to use public methods you can contact us at [email protected]

Contributing

Check out the contributing wiki to join the group of amazing people making this project possible

License

MIT License - see LICENSE for full text

stun's People

Contributors

at-wat avatar backkem avatar bixycler avatar cohosh avatar david-dp- avatar enobufs avatar ernado avatar fossabot avatar hugoarregui avatar jech avatar jerry-tao avatar jinleileiking avatar maanas avatar masterada avatar moisesbr avatar muesli avatar nicolai86 avatar pionbot avatar renovate-bot avatar renovate[bot] avatar scorpionknifes avatar sean-der avatar snawoot avatar songjiayang avatar stv0g avatar suboptimal avatar u5surf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stun's Issues

STUN: Avoid hijacking buffers

The buffer passed to NewMessage should be re-usable afterwards. It should not be kept around in the Message object.
Short term solution: Copy the buffer.
Full solution: Store only the parsed data, not the raw data.

stun.voip.blackberry.com no longer supports NAT discovery?

I ran stun-nat-behaviour as part of trying to set up a Tor snowflake proxy (based on these instructions: https://community.torproject.org/relay/setup/snowflake/standalone/). However it says:

INFO: 2023/05/08 05:10:32 Error: NAT discovery feature not supported by this server

Changing the stun server to stun.voipgate.com:3478 (found here: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/34129#note_2595581) gives results. So maybe default to that?

atomic.LoadInt64 panics on ARM

Running the gstreamer-receive example from (example-webrtc-applications), with TURN enable on ARMx32 plataform return panic error,

to enable Turn:

config := webrtc.Configuration{
	ICEServers: []webrtc.ICEServer{
	  {
	    URLs: []string{"turn:myserver.casainteligente.ind.br:3478"},
	    Username: "myuser",
	    Credential: "mypassword",
	   },
	},
}

Panic Error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12d44]

goroutine 19 [running]:
runtime/internal/atomic.goLoad64(0x1485124, 0x6252625e, 0xbf35341d)
        /usr/local/go/src/runtime/internal/atomic/atomic_arm.go:127 +0x1c
github.com/pion/stun.(*Client).Start(0x1485110, 0x1490570, 0x147b6a0, 0x340fd8, 0x147df01)
        /root/go/src/github.com/pion/stun/client.go:607 +0x2e8
github.com/pion/stun.(*Client).Do(0x1485110, 0x1490570, 0x14825c0, 0x0, 0x0)
        /root/go/src/github.com/pion/stun/client.go:493 +0xe8
github.com/pion/turnc.(*Client).do(0x14850a0, 0x1490570, 0x1490540, 0x1ac504, 0x362b58)
        /root/go/src/github.com/pion/turnc/client.go:212 +0x80
github.com/pion/turnc.(*Client).allocate(0x14850a0, 0x1490570, 0x1490540, 0x4, 0x0, 0x0)
        /root/go/src/github.com/pion/turnc/client_allocation.go:44 +0x30
github.com/pion/turnc.(*Client).Allocate(0x14850a0, 0x1482570, 0x4037c0, 0x1485110)
        /root/go/src/github.com/pion/turnc/client_allocation.go:106 +0x164
github.com/pion/ice.(*Agent).gatherCandidatesRelay(0x1510120, 0x14e2378, 0x1, 0x2, 0x14e6828, 0x2)
        /root/go/src/github.com/pion/ice/gather.go:300 +0x1c8
github.com/pion/ice.(*Agent).gatherCandidates(0x1510120)
        /root/go/src/github.com/pion/ice/gather.go:136 +0x100
github.com/pion/ice.NewAgent(0x150bca0, 0x0, 0x0, 0x0)
        /root/go/src/github.com/pion/ice/agent.go:320 +0x6ac
github.com/pion/webrtc.(*ICEGatherer).createAgent(0x1528070, 0x0, 0x0)
        /root/go/src/github.com/pion/webrtc/icegatherer.go:113 +0x1bc
github.com/pion/webrtc.(*ICEGatherer).Gather(0x1528070, 0x14e8e30, 0x2800)
        /root/go/src/github.com/pion/webrtc/icegatherer.go:129 +0x1c
github.com/pion/webrtc.(*PeerConnection).SetRemoteDescription(0x14f0000, 0x1, 0x1556000, 0x187c, 0x0, 0x225c, 0x0)
        /root/go/src/github.com/pion/webrtc/peerconnection.go:865 +0xaac
main.gstreamerReceiveMain()
        /root/go/src/github.com/pion/example-webrtc-applications/gstreamer-receive/main.go:107 +0x3a8
created by main.main
        /root/go/src/github.com/pion/example-webrtc-applications/gstreamer-receive/main.go:139 +0x24
exit status 2

this error is caused at line

stun/client.go

Line 607 in 8e0ec0d

t.rto = time.Duration(atomic.LoadInt64(&c.rto))

simple comment this line works, but I would like to know a better approach to solve this problem

some docs found
https://golang.org/pkg/sync/atomic/#pkg-note-BUG
ethereum/go-ethereum#19590
golang/go#9959

how test turn server

how test turn server
like:

{
	url: 'turn:numb.viagenie.ca',
	credential: 'muazkh',
	username: '[email protected]'
},
{
	url: 'turn:192.158.29.39:3478?transport=udp',
	credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
	username: '28224511:1379330808'
},
{
	url: 'turn:192.158.29.39:3478?transport=tcp',
	credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
	username: '28224511:1379330808'
}

Update paths to use `pion` instead of `gortc`

I think the big ones are

  • Move appveyor
  • Update API compatibility checks
  • (Maybe move Dockerfiles?)
  • (Maybe move demo server to pion.ly?)
seaduboi@38f9d359441f:~/go/src/github.com/pion/stun$ rg gortc
AUTHORS
8:The gortc project

Makefile
46:	go get gortc.io/api
49:	docker build -t gortc/stun .

stun.go
10:// See examples for Message for basic usage, or https://github.com/gortc/turn

message_test.go
828:		NewSoftware("gortc/stun"),
849:		NewSoftware("gortc/stun"),
881:		NewSoftware("gortc/stun"),

appveyor.yml
11:clone_folder: c:\gopath\src\github.com\gortc\stun

README.md
111:  * Explicit API backward compatibility [check](https://github.com/gortc/api), see `api` directory
113:See [TeamCity project](https://tc.gortc.io/project.html?projectId=stun&guest=1) and `e2e` directory

e2e/docker-compose.yml
15:    image: gortc/coturn

e2e/test.sh
32:docker build -t gortc/tcpdump -f tcpdump.Dockerfile .
42:    --name ci_stun-tcpdump --net=host gortc/tcpdump

cmd/stun-traversal/Readme.md
1:stun-traversal is a small NAT traversal proof of concept using package gortc/stun. Peer exchange is done manually using stdin.

cmd/stun-traversal/main.go
17:	server = flag.String("server", fmt.Sprintf("gortc.io:3478"), "Stun server address")

Ignore comprehension bits in the STUN attribute type field

Your environment.

  • Version: v0.3.1
  • Browser: n/a

What did you do?

STUN binding transaction failed with the following public STUN servers:

  • stun.sipgate.net
  • stun.ekiga.net

What did you expect?

STUN binding should succeed.

What happened?

These servers (older implementation) returns XOR-MAPPED-ADDRESS with comprehension-required bit set, the type value being 0x8020..
Pion.stun only expects XOR-MAPPED-ADDRESS to be 0x0020, and discards the attribute.

These servers are implemented with older version of STUN, when XOR-MAPPED-ADDRESS was assigned as 'comprehension-optional', therefore, it should be optional for the client to use, but there's no way to retrieve the attribute because it is dropped, and 0x08020 is not defined. Both 0x0020 and 0x8020 must be treated as XOR-MAPPED-ADDRESS.

We should ignore the first bit of attribute field so that we can parse the field correctly regardless of the comprehension bits. Instead, we should introduce a new field to RawAttribute struct, for example, ComprehensionOptional bool so that the application can tell whether the field was required or not. This way, we can use older version of STUN server, and also the pion would be compatible with the future version of STUN messages, meaning, the following attributes are currently optional, but it may become a requirement in the future. At that point, current pion implementation would break!

  • AttrSoftware AttrType = 0x8022 // SOFTWARE
  • AttrAlternateServer AttrType = 0x8023 // ALTERNATE-SERVER
  • AttrFingerprint AttrType = 0x8028 // FINGERPRINT

Unpack for all attribute types

Complete the implementation of the unpack methods on all attribute types.
Most important for debugging:

  • ErrorCode
  • UnknownAttributes

stun-nat-behaviour: command not found

Your environment.

Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 4.19.104-microsoft-standard x86_64)

What did you do?

Followed README at https://github.com/pion/stun/tree/master/cmd/stun-nat-behaviour

$ sudo apt install golang-go # version 2:1.13~1ubuntu2
$ go get github.com/pion/stun/cmd/stun-nat-behaviour
$ go
Go is a tool for managing Go source code.

$ stun-nat-behaviour
stun-nat-behaviour: command not found

What did you expect?

A usage string from stun-nat-behaviour, because "[options]" aren't expanded and explained in the README

What happened?

stun-nat-behaviour couldn't be executed...seemingly because no working copy was downloaded:

$ ls -l
total 4
drwxr-xr-x 4 david david 4096 Aug 13 14:42 go

$ ls -l go
total 8
drwxr-xr-x 2 david david 4096 Aug 13 14:42 bin
drwxr-xr-x 3 david david 4096 Aug 13 14:42 src

m.Raw allocate is to small

Your environment.

  • Version: Release or SHA
  • Browser: include version
  • Other Information - stacktraces, related issues, suggestions how to fix, links for us to have context

What did you do?

What did you expect?

m.Raw = make([] byte, 2048)

What happened?

clinet.go readUntiClosed , the m.Raw allocate buffer 1024 is to small , some DTLS data is big ,more then 1024,will raise the data is lost by local memory,

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.


  • Check this box to trigger a request for Renovate to run again on this repository

Fix lint warnings

Fix all the megacheck, golint and errcheck warnings so we can get the travis builds green again.

TODO:

  • Rename GenerateTransactionId. Suggested to do this by:
  1. Leave the old func name as a proxy to the new one and mark it as deprecated.
  2. Create accompanying PRs on pions/turn and pions/webrtc to migrate to the new API.

Add utility to help user discover their NAT type

Summary

Other tools like go-stun can print the type of NAT detected by the STUN server:

> go-stun
NAT Type: Full cone NAT
External IP Family: 1
External IP: 166.111.4.100
External Port: 23009

t would be convenient if our stun did this too, and printed the result to the info log. That way people could include it in issue descriptions while debugging ICE.

stun-client.go fails on double-stack host

$ go run stun-client.go stun.l.google.com:19302
2021/01/19 00:31:22 <nil>
exit status 1
$ sudo ip -6 addr flush dev wlan0
$ go run stun-client.go stun.l.google.com:19302
xxx.xxx.xxx.xxx:52240

README.md outdated. go get is now used differently

What did you do?

go get github.com/pion/stun/tree/master/cmd/stun-nat-behaviour

What did you expect?

installing stun-nat-behaviour

What happened?

got error.

used go install github.com/pion/stun/tree/master/cmd/stun-nat-behaviour@latest and it worked

Support TCP STUN for stun-nat-behavior

I had the only opened TCP for Inbound rules for port 443

stun-nat-behaviour --server turn.myserver.dev:443
2020/06/07 22:45:39 Connecting to STUN server: turn.myserver.dev:443
2020/06/07 22:45:39 Local address: 0.0.0.0:50272
^C⏎

But when I enable UDP for Inbound rules for port 443.. then I see

stun-nat-behaviour --server turn.myserver.dev:443
2020/06/07 22:46:41 Connecting to STUN server: turn.myserver.dev:443
2020/06/07 22:46:41 Local address: 0.0.0.0:56357
2020/06/07 22:46:41 Received xormapped address: 103.51.74.193:56357
^C⏎

Same happed with port 5349. Do we really need to have UDP protocol open in ordered to get xormapped address?

TestClientGC hangs

https://github.com/pion/stun/pull/90/checks?check_run_id=3093408033

=== RUN   TestClientGC
coverage: 47.1
panic: test timed out after 10m0s

goroutine 82 [running]:
testing.(*M).startAlarm.func1()
	/opt/hostedtoolcache/go/1.15.13/x64/src/testing/testing.go:1618 +0x11f
created by time.goFunc
	/opt/hostedtoolcache/go/1.15.13/x64/src/time/sleep.go:167 +0x52

goroutine 1 [chan receive]:
testing.(*T).Run(0xc000001980, 0x749132, 0xc, 0x755f10, 0x1)
	/opt/hostedtoolcache/go/1.15.13/x64/src/testing/testing.go:1169 +0x5f4
testing.runTests.func1(0xc000001980)
	/opt/hostedtoolcache/go/1.15.13/x64/src/testing/testing.go:1439 +0xa7
testing.tRunner(0xc000001980, 0xc00007dc78)
	/opt/hostedtoolcache/go/1.15.13/x64/src/testing/testing.go:1123 +0x203
testing.runTests(0xc00000e0c0, 0x8eee60, 0x73, 0x73, 0xc034d8ee4e87ed1a, 0x8bb2e65df0, 0x8f1ce0, 0x44af65)
	/opt/hostedtoolcache/go/1.15.13/x64/src/testing/testing.go:1437 +0x613
testing.(*M).Run(0xc000142000, 0x0)
	/opt/hostedtoolcache/go/1.15.13/x64/src/testing/testing.go:1345 +0x3b4
main.main()
	_testmain.go:451 +0x357

goroutine 79 [semacquire]:
sync.runtime_Semacquire(0xc0000aa460)
	/opt/hostedtoolcache/go/1.15.13/x64/src/runtime/sema.go:56 +0x45
sync.(*WaitGroup).Wait(0xc0000aa458)
	/opt/hostedtoolcache/go/1.15.13/x64/src/sync/waitgroup.go:130 +0xe5
github.com/pion/stun.(*tickerCollector).Close(0xc0000aa450, 0x1, 0x9)
	/home/runner/work/stun/stun/client.go:377 +0x7a
github.com/pion/stun.(*Client).Close(0xc0001206e0, 0x468959, 0x755f08)
	/home/runner/work/stun/stun/client.go:396 +0x162
github.com/pion/stun.TestClientGC.func2(0xc0001206e0, 0xc000049e20, 0xc0000ca180)
	/home/runner/work/stun/stun/client_test.go:575 +0x3d
github.com/pion/stun.TestClientGC(0xc0000ca180)
	/home/runner/work/stun/stun/client_test.go:584 +0x546
testing.tRunner(0xc0000ca180, 0x755f10)
	/opt/hostedtoolcache/go/1.15.13/x64/src/testing/testing.go:1123 +0x203
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.15.13/x64/src/testing/testing.go:1168 +0x5bc

goroutine 80 [chan send]:
github.com/pion/stun.(*gcWaitAgent).Collect(0xc000010040, 0xc034d85852371d0f, 0x3cc1de5, 0x8f1ce0, 0x8f1ce0, 0x3cc1de5)
	/home/runner/work/stun/stun/client_test.go:543 +0x56
github.com/pion/stun.NewClient.func1(0xc034d85852371d0f, 0x3cc1de5, 0x8f1ce0)
	/home/runner/work/stun/stun/client.go:147 +0xa3
github.com/pion/stun.(*tickerCollector).Start.func1(0xc0000aa450, 0xc000067040, 0xc0000a27a0)
	/home/runner/work/stun/stun/client.go:368 +0x10d
created by github.com/pion/stun.(*tickerCollector).Start
	/home/runner/work/stun/stun/client.go:360 +0xb2

goroutine 81 [runnable]:
github.com/pion/stun.(*Message).Decode(0xc0001604b0, 0xc000000001, 0xe1738bf)
	/home/runner/work/stun/stun/message.go:371 +0x546
github.com/pion/stun.(*Message).ReadFrom(0xc0001604b0, 0x7fe42eb44008, 0xc000012b80, 0x7fe42eb44008, 0xc000012b80, 0x0)
	/home/runner/work/stun/stun/message.go:340 +0x17b
github.com/pion/stun.(*Client).readUntilClosed(0xc0001206e0)
	/home/runner/work/stun/stun/client.go:327 +0x22a
created by github.com/pion/stun.NewClient
	/home/runner/work/stun/stun/client.go:152 +0x647
FAIL	github.com/pion/stun	600.027s
FAIL

Does it support ipv6?

Does it support ipv6? Although our ipv6 does not have a nat, the superior route has a firewall, and the inbound is completely blocked, and because it is a 4G network, the firewall settings cannot be changed. I am wondering whether stun can be used in ipv6.

goroutine 1228

code:
https://github.com/hktalent/dht/blob/dc96edf02e3466d8b232d2fe1a963ebf7d64bf68/stunList.go#L98

1358 @ 0x1038316 0x1031a37 0x1061d49 0x10aa832 0x10ab3da 0x10ab3c8 0x1172b69 0x117eb45 0x12e0488 0x12dd958 0x10676e1
#	0x1061d48	internal/poll.runtime_pollWait+0x88			/usr/local/Cellar/go/1.18/libexec/src/runtime/netpoll.go:302
#	0x10aa831	internal/poll.(*pollDesc).wait+0x31			/usr/local/Cellar/go/1.18/libexec/src/internal/poll/fd_poll_runtime.go:83
#	0x10ab3d9	internal/poll.(*pollDesc).waitRead+0x259		/usr/local/Cellar/go/1.18/libexec/src/internal/poll/fd_poll_runtime.go:88
#	0x10ab3c7	internal/poll.(*FD).Read+0x247				/usr/local/Cellar/go/1.18/libexec/src/internal/poll/fd_unix.go:167
#	0x1172b68	net.(*netFD).Read+0x28					/usr/local/Cellar/go/1.18/libexec/src/net/fd_posix.go:55
#	0x117eb44	net.(*conn).Read+0x44					/usr/local/Cellar/go/1.18/libexec/src/net/net.go:183
#	0x12e0487	github.com/pion/stun.(*Message).ReadFrom+0x47		/Users/51pwn/go/pkg/mod/github.com/pion/[email protected]/message.go:306
#	0x12dd957	github.com/pion/stun.(*Client).readUntilClosed+0xf7	/Users/51pwn/go/pkg/mod/github.com/pion/[email protected]/client.go:323

1357 @ 0x1038316 0x1047c32 0x12ddc48 0x10676e1
#	0x12ddc47	github.com/pion/stun.(*tickerCollector).Start.func1+0xe7	/Users/51pwn/go/pkg/mod/github.com/pion/[email protected]/client.go:359

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.