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

Overview

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.

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 only. If you need a list of TCP servers, open an issue.

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.

Comments
  • build: 👷 Build every hour and commit the results

    build: 👷 Build every hour and commit the results

    I took it upon myself to try to implement a solution for #2. I use GitHub actions, so the process is fairly familiar to me. I'm not familiar with RUST, but since this is a simple shell script, I assume it should just work.

    You'll need to make some secrets for any private keys your build process needs. The secrets documentation is helpful, or you can just follow the example I made for IPGEOLOCATIONIO_API_KEY

    jobs:
      check_list:
        env:
          IPGEOLOCATIONIO_API_KEY: ${{ secrets.IPGEOLOCATIONIO_API_KEY }}
    

    fixes #2

    opened by tarwich 12
  • How about realizing this as a self-triggering GitHub Action?

    How about realizing this as a self-triggering GitHub Action?

    Hey :)

    this project is truly amazing! The only thing I think that could make it even better is a self-triggering GitHub action. It seems like that the Rust scripts being triggered "externally". But this would "stop" if the "central" infra that triggers this update script stops working for some reason. But if implemented as a GitHub Action, this would run forever, and be much more resilient?

    Self-triggering can be approached when you build a GitHub Action that registers an action on push that runs the rust, and then waits a while (NOP) before it pushes to the very same repo -> recursion.

    Thanks a lot for your work here!

    opened by kyr0 9
  • Add support for stun over tcp

    Add support for stun over tcp

    Only a few servers support tcp protocol, for example, stun.mixvoip.com:3478. Hope to add a list of whether the server supports stun over tcp protocol. Thank you.

    opened by Alozxy 4
  • Change IP geolocation provider to geolocation-db.com

    Change IP geolocation provider to geolocation-db.com

    Our current geolocation provider requires an API key and limits the number of requests. Let's switch to one that does not do that, such as geolocation-db.com

    opened by pradt2 1
  • GeoLocation / Nearest STUN server

    GeoLocation / Nearest STUN server

    Hey,

    another one, I've wrote a TypeScript script to allocate geo location data per IP. This can be extremely helpful for selecting the nearest and fastest STUN server. Results attached as JSON.

    import { Lookup, lookup } from "geoip-lite"
    import { readFileSync, writeFileSync } from "fs"
    
    interface ServerWithGeoLocation {
        ip: string
        port: number
        geoLocation: Lookup | null
    }
    const stunServersWithGeo: Array<ServerWithGeoLocation> = []
    
    JSON.parse(readFileSync('stunServerIps.json', {
        encoding: 'utf8'
    })).map((stunServer: string) => {
    
        const serverAddress = stunServer.split(':')
        const ip = serverAddress[0]
        const port = parseInt(serverAddress[1], 10)
    
        stunServersWithGeo.push({
            ip,
            port,
            geoLocation: lookup(ip)
        })
    })
    
    writeFileSync(
      'stunServersWithGeoLocation.json', 
      JSON.stringify(stunServersWithGeo, null, 2), 
      { encoding: 'utf8' }
    )
    

    The file: stunServerIps.json contains the STUN server addresses like this:

    [
        "37.97.65.52:3478",
        "158.69.57.20:3478",
        "150.254.161.60:3478",
        "44.224.155.217:3478",
        "176.9.24.184:3478",
         ...
     ]
    

    In general I can only recommend saving them as JSON too because it's easier accessible in many programming languages.

    Result looks like this:

    [{
       "ip": "203.13.68.16",
       "port": 3478,
       "geoLocation": {
         "range": [
           3406644224,
           3406645247
         ],
         "country": "AU",
         "region": "QLD",
         "eu": "0",
         "timezone": "Australia/Brisbane",
         "city": "Varsity Lakes",
         "ll": [
           -28.0867,
           153.4116
         ],
         "metro": 0,
         "area": 1
       }
     }, ... ]
    

    This can be easily matches client-side with the result from a GeoLocation API call at client-side in-browser:

    import * as tzlookup from "tz-lookup"
    
    const getGeoLocation = () => {
    
     navigator.geolocation.getCurrentPosition((position) => {
       console.log('position', position)
    
       const timeZone = tzlookup(position.coords.latitude, position.coords.longitude)
       console.log('timeZone', timeZone)
     }, () => {
       console.error('Error fetching GeoLocation')
     });
    }
    

    And thus timeZone will report:

    Bildschirmfoto 2022-03-05 um 19 54 58

    ...and we can simply go thru the nearest STUN servers now and connect to these.

    stunServersWithGeoLocation.json.zip

    opened by kyr0 2
  • Add client-side/JS fetch() use case example to readme maybe

    Add client-side/JS fetch() use case example to readme maybe

    Hey :)

    as up-to-date STUN servers lists are often needed to be known in-browser, and you might not want to hard-code them, you can actually use this code in-browser to fetch them fresh from GitHub, and Microsoft will pay for the traffic + takes care for DDoS protection:

    const stunServerList = (await (await fetch(
          'https://raw.githubusercontent.com/pradt2/always-online-stun/master/valid_ipv4s.txt'
    )).text()).split('\n')
    
    Bildschirmfoto 2022-03-04 um 23 49 26
    opened by kyr0 3
  • Lots of hosts do not respond for my internet connection

    Lots of hosts do not respond for my internet connection

    Hi,

    Thanks for this list, this is going to be super useful for my little project to find out what port ranges are used for cgnat!

    I noticed that I don't get any response for lots of hosts in the hourly updated valid_ipv4s.txt using my own script pystun, I tried to validate this by running "run.sh" on Fedora 35 but that's even worse (all hosts seem to fail):

    OK 0 , DNS failure 78 , p/Timeout 0 , Timeout 508 , Incorrect 47
    

    I guess there could be a difference in connectivity depending on the Internet connection, it would also be very helpful if the capabilities of the stun servers are available.

    opened by meeuw 10
Owner
null
Github mirror of codeberg repo. Monitor live bandwidth usage/ network speed on PC. Native version also available for Android, separately.

Netspeed Monitor Netspeed is a cross-platform desktop application that shows the live upload speed, download speed and day's usage as an overlay. Feat

Vishnu N K 16 May 3, 2023
Extremely fast JavaScript minifier, available for Rust and Node.js

minify-js Extremely fast JavaScript minifier, written in Rust. Goals Fully written in Rust for maximum compatibility with Rust programs and derivative

Wilson Lin 78 Jul 13, 2023
Ever wanted to torture your CPU by generating every image possible?

dumpsterfire Ever wanted to torture your CPU by generating every image possible? Well, now you can! This thing is worse than mining Bitcoin, since the

null 2 Jun 14, 2022
List of Persian Colors and hex colors for CSS, SCSS, PHP, JS, Python, and Ruby.

Persian Colors (Iranian colors) List of Persian Colors and hex colors for CSS, SCSS, PHP, C++, QML, JS, Python, Ruby and CSharp. Persian colors Name H

Max Base 12 Sep 3, 2022
The most fundamental type for async synchronization: an intrusive linked list of futures

wait-list This crate provides WaitList, the most fundamental type for async synchronization. WaitList is implemented as an intrusive linked list of fu

Sabrina Jewson 7 Oct 26, 2022
A safe `Pin`-based intrusive doubly-linked list in Rust

pin-list This crate provides PinList, a safe Pin-based intrusive doubly linked list. Example A thread-safe unfair async mutex. use pin_project_lite::p

Sabrina Jewson 7 Oct 26, 2022
LinkedBytes is a linked list of Bytes and BytesMut.

LinkedBytes LinkedBytes is a linked list of Bytes and BytesMut (though we use VecDeque to implement it now). It is primarily used to manage Bytes and

Volo 5 Dec 9, 2022
A publicly available implementation of knewjade's NNUE based search heuristic for HATETRIS.

A publicly available implementation of knewjade's NNUE based search heuristic for HATETRIS.

Felipe 4 Mar 13, 2023
Rewrite of the Discord Bot used for Managing the Infinity Bot List Servers.

Arcadia Rewrite of the Discord Bot used for Managing the Infinity Bot List Servers. Contributing Always run fmt.sh before making a Pull Request! MacOS

InfinityBotList 3 Dec 15, 2022
A small programming language created in an hour

Building a programming language in an hour This is the project I made while doing the Building a programming language in an hour video. You can run it

JT 40 Nov 24, 2022
Small utility to display hour in a binary format on the Novation's Launchpad X.

lpx-binary-clock Small utility to display hour in a binary format on the Novation's Launchpad X. Hours, minutes and seconds are displayed one digit pe

Alexis LOUIS 1 Feb 13, 2022
Adapt the screen's color spectrum according to the hour of the day in order to improve your sleep

circadianlight What It Is Circadian Light is a program, currently only working on Linux with X, that controls the color spectrum of your screen accord

null 7 Dec 28, 2022
Convert a unix timestamp (seconds) to a struct {year, month, day, hour, minute, second, weekday}.

uts2ts uts2ts is a simple function that does only one thing: It converts a unix timestamp to something slightly more useful. ;-) So why then? Well, it

Helmut K. C. Tessarek 6 Jul 26, 2023
Code accompanying the 1 Hour Dive into Async live stream.

1 Hour Async This is the code accompanying the 1 Hour Dive into Async live-stream. The slides are here You can watch the recorded event on YouTube Inc

Herbert 9 Aug 2, 2023
Contain an energetic quantum particle by strategically placing walls in this 48-hour jam game

Contain an energetic quantum particle by strategically placing walls in this 48-hour jam game. Made with Bevy Engine.

Nilay Savant 5 Aug 18, 2023
📜 A pci.ids-compliant library for getting information about available PCI devices.

aparato A pci.ids-compliant library for getting information about available PCI devices. Usage Add the following to your project's Cargo.toml file: ap

Aziz Ben Ali 22 Nov 14, 2022
A safe implementation of the secure remote password authentication and key-exchange protocol (SRP), SRP6a and legacy are as features available.

Secure Remote Password (SRP 6 / 6a) A safe implementation of the secure remote password authentication and key-exchange protocol (SRP version 6a). Ver

Sven Assmann 10 Nov 3, 2022
Hi I'm Sophy, a discord bot in devlopment, soon I'll be available to help everyone (❁´◡`❁)

Sophy Bot Hi I'm Sophy, a discord bot in devlopment, soon I'll be available to help everyone (❁´◡`❁) Contribution Do you like me and want to help me?

Far Dragi 0 May 30, 2022
A library to access BGPKIT Broker API and enable searching for BGP data archive files over time from public available data sources.

BGPKIT Broker BGPKIT Broker is a online data API service that allows users to search for publicly available BGP archive files by time, collector, proj

BGPKIT 10 Nov 30, 2022
🤖 Autonomous Twitter bot that posts analytics of the APYs available on the Solend Protocol.

Solend APY Twitter Bot Solana Ignition Hackathon 2021 View Demo · Report Bug · Request Feature Table of Contents About The Project Motivation Challeng

Manuel Gil 4 Sep 23, 2022