# Stunner: Quickly Detect Your NAT Type with Multi-Server STUN

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/jaxxstorm-stunner
Generated for open source discovery and AI-assisted research.

Stunner is an efficient Go CLI tool designed to accurately detect your Network Address Translation (NAT) type. By sending STUN Binding Requests to multiple servers, it classifies your NAT as Full Cone, Symmetric, or Restricted, providing crucial insights into your network environment. This helps users understand network behavior and assess the feasibility of techniques like hole punching.

GitHub: https://github.com/jaxxstorm/stunner
OSRepos URL: https://osrepos.com/repo/jaxxstorm-stunner

## Summary

Stunner is an efficient Go CLI tool designed to accurately detect your Network Address Translation (NAT) type. By sending STUN Binding Requests to multiple servers, it classifies your NAT as Full Cone, Symmetric, or Restricted, providing crucial insights into your network environment. This helps users understand network behavior and assess the feasibility of techniques like hole punching.

## Topics

- network
- tailscale
- Go
- NAT detection
- STUN
- CLI tool
- networking utility

## Repository Information

Last analyzed by OSRepos: Wed May 13 2026 20:23:20 GMT+0100 (Western European Summer Time)
Detail views: 3
GitHub clicks: 5

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

Stunner is a lightweight yet powerful Go command-line interface (CLI) tool that simplifies the complex task of Network Address Translation (NAT) type detection. It operates by sending STUN Binding Requests to multiple STUN servers, including Tailscale DERP servers, to accurately determine your NAT classification. This process helps identify whether you are behind a Full Cone, Symmetric, Restricted, or other NAT type, offering valuable insights into your network's behavior.

Key features of Stunner include:

*   **Multi-Server STUN**: Queries more than one server to enhance NAT type detection accuracy.
*   **Dynamic DERP Fetching**: Automatically fetches and uses two random Tailscale DERP servers if no specific STUN servers are provided.
*   **NAT Classification**: Provides a clear overall NAT result, labeling it with types like "Open Internet," "Full Cone," or "Symmetric NAT," along with an "Easy" or "Hard" rating for hole punching.
*   **Verbose Debug Logging**: An optional `--debug` flag allows for detailed tracing of each request and response.
*   **Tabular Output**: Presents results in an easy-to-read table format.

## Installation

Stunner offers several convenient installation methods:

### OS X

Install using Homebrew:

bash
brew install jaxxstorm/tap/stunner


### Linux

Download the binary from the releases page:

bash
VERSION=v0.0.10
curl -L "https://github.com/jaxxstorm/stunner/releases/download/${VERSION}/stunner-${VERSION}-linux-amd64.tar.gz" | tar -xz
./stunner --version


### Using Go

If you have Go installed, you can build and install it directly:

bash
go install github.com/jaxxstorm/stunner@latest


The resulting binary will be located in your `$GOPATH/bin` directory.

## Examples

Stunner is straightforward to use. Here are some common usage examples:

**Let Stunner fetch DERP servers automatically:**

bash
./stunner --debug


**Supply your own STUN servers:**

bash
./stunner --stun-server=stun1.l.google.com --stun-server=stun2.l.google.com


When you run Stunner, it performs the following steps:

1.  **Binds** a local UDP socket on the specified IP/port.
2.  **Sends** STUN Binding Requests to each configured server.
3.  **Parses** the responses, capturing your external IP/port.
4.  **Compares** the external ports from each server to classify your NAT type.
5.  **Prints** the results in a clear, tabular format.

## Why Use Stunner?

Stunner provides a crucial utility for anyone dealing with network configurations, especially in distributed or peer-to-peer environments. Its multi-server approach significantly enhances the accuracy of NAT type detection, moving beyond the limitations of single-server tests. This precise classification, coupled with an "Easy/Hard" rating for hole punching, empowers developers and network administrators to better understand network traversal challenges. Whether you're troubleshooting connectivity issues or designing robust P2P applications, Stunner offers clear, actionable insights into your network's NAT behavior.

## Links

*   **GitHub Repository**: [jaxxstorm/stunner](https://github.com/jaxxstorm/stunner)