GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - myxdress/always-online-stun: A list of publicly available STUN servers, refreshed every hour.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

19,255 Commits
19,255 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
examples
examples
 
 
src
src
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
candidates.txt
candidates.txt
 
 
geoip_cache.txt
geoip_cache.txt
 
 
rust-toolchain
rust-toolchain
 
 
valid_hosts.txt
valid_hosts.txt
 
 
valid_hosts_tcp.txt
valid_hosts_tcp.txt
 
 
valid_ipv4s.txt
valid_ipv4s.txt
 
 
valid_ipv4s_tcp.txt
valid_ipv4s_tcp.txt
 
 
valid_ipv6s.txt
valid_ipv6s.txt
 
 
valid_ipv6s_tcp.txt
valid_ipv6s_tcp.txt
 
 

Repository files navigation

Always Online: STUN servers

GitHub commit activity GitHub last commit GitHub

Have you ever thought: Gosh, why isn't there a regularly updated, comprehensive list of publicly available STUN servers?

Well, this is it. A list of online STUN servers, refreshed hourly.

How to use

Hardcode this link valid_hosts.txt into your application, and use it anytime you need a fresh list of online STUN servers.

Or, if you don't want to rely on DNS resolution, use valid_ipv4s.txt for IPv4, and valid_ipv6s.txt for IPv6 addresses.

JS example with Geolocation

const GEO_LOC_URL = "https://raw.githubusercontent.com/pradt2/always-online-stun/master/geoip_cache.txt";
const IPV4_URL = "https://raw.githubusercontent.com/pradt2/always-online-stun/master/valid_ipv4s.txt";
const GEO_USER_URL = "https://geolocation-db.com/json/";
const geoLocs = await(await fetch(GEO_LOC_URL)).json();
const { latitude, longitude } = await(await fetch(GEO_USER_URL)).json();
const closestAddr = (await(await fetch(IPV4_URL)).text()).trim().split('\n')
    .map(addr => {
        const [stunLat, stunLon] = geoLocs[addr.split(':')[0]];
        const dist = ((latitude - stunLat) ** 2 + (longitude - stunLon) ** 2 ) ** .5;
        return [addr, dist];
    }).reduce(([addrA, distA], [addrB, distB]) => distA <= distB ? [addrA, distA] : [addrB, distB])[0];
console.log(closestAddr); // prints the IP:PORT of the closest STUN server

FAQ

But hard-coding of links is baaaad?!

Well, not exactly. Hard-coding of links which were never meant to be hard-coded is bad. Here the situation is different. Since I recommend that users hard-code the links to the few specific files, I'll avoid doing anything that would make the link invalid (e.g. I won't change the name of the file, name of the repository, my Github username, etc.).

But I still don't feel comfortable hard-coding any links...

Feel free to open an issue and let's discuss your specific needs.

How often are the lists refreshed?

Hourly, you can see the timestamp of the last check in the commit message.

What RFC spec do the servers conform to?

As long as the server correctly responds to an RFC5389 BINDING request, it is judged as healthy. This is enough to establish the NAT mapping of a given socket.

Noteworthy: the server does not need to respond with an alternate IP address to be judged as healthy. This can be a problem if you need a server with full RFC5389/5780 NAT testing (endpoint mapping and filtering modes) capability.

If you need a list of servers that support RFC5389/5780 NAT testing, open an issue.

What IP versions and transport protocols are tested?

IP versions 4 and 6. UDP and TCP.

I noticed that the lists are shuffled on each check. Why?

Lazy/inconsiderate devs will tend to just grab the top-most link from the list (and TBF, can we blame them?). By shuffling the list, I ensure that we don't end up spamming the same host forever.

What servers are checked, and how can I add more publicly available servers?

The list is in candidates.txt. Feel free to create a PR adding more servers, or just open an issue and list them there.

My server is on your list, and I don't like it. What can I do?

Open an issue, and it will be removed from the automated checks within 24 hours.

About

A list of publicly available STUN servers, refreshed every hour.

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.