stun icon indicating copy to clipboard operation
stun copied to clipboard

stun.DialConfig{} requires a tls.Config instead of *tls.Config

Open kosmas-valianos opened this issue 5 months ago • 3 comments

If you want to use stun.DialURI with a custom stun.DialConfig you are required to use a tls.Config instead of a pointer to it. That ends up in "copying lock" whining from linters etc.

kosmas-valianos avatar Aug 12 '25 13:08 kosmas-valianos

Note: Yes of course you can build directly a stun.DialConfig instead but it would be nicer to have the ability to pass tls.Config that come from other places

kosmas-valianos avatar Aug 13 '25 09:08 kosmas-valianos

I guess it will never happen as it will break backwards compatibility but maybe something to keep in mind in case a v3 is released

kosmas-valianos avatar Aug 20 '25 08:08 kosmas-valianos

We'll keep this issue open, as something to consider when we're making a new major version, we can also make a "hack" for the current version. Thank you.

JoTurk avatar Aug 20 '25 09:08 JoTurk