GlenDC / go-external-ip

a Golang library to get your external ip from multiple services
MIT License
71 stars 25 forks source link

Support STUN Protocol and add it as a provider #1

Open GlenDC opened 7 years ago

GlenDC commented 7 years ago

Using https://github.com/ccding/go-stun it should be fairly easy to support the STUN protocol.

Just need to make sure that RFC5780 is sufficient supported, to make it work with out-in-the-wild servers.

See: https://github.com/ccding/go-stun/issues/20

x11x commented 1 year ago

I just want to mention this project github.com/Snawoot/extip which has implemented this.

They are using github.com/gortc/stun which is archived and seems to have been replaced by github.com/pion/stun. At first glance this appears currently maintained and full-featured, claims to implement RFC5780 (just based on the readme, I have not investigated the particular issue you mentioned).

Just thought I would post that here for the options of either contributing to Snawoot/extip or just using it as a reference for implementing this. They have a list of public STUN servers to use (circa 2020), and using a simple quorum system similar to this project I think.

x11x commented 1 year ago

Also, some lists of public STUN servers which appear to be (currently) maintained: