- Python 99%
- Shell 0.7%
- Batchfile 0.3%
|
|
||
|---|---|---|
| .forgejo | ||
| assets | ||
| scripts | ||
| src | ||
| tests | ||
| .gitignore | ||
| CHANGELOG.md | ||
| conftest.py | ||
| generate_icons.py | ||
| init.sh | ||
| install-linux.sh | ||
| NatTypeTester-NG.desktop | ||
| nattypetester.spec | ||
| pyproject.toml | ||
| pytest.ini | ||
| README.md | ||
| RELEASE.md | ||
| requirements.txt | ||
NatTypeTester-NG
A cross-platform NAT type detection tool built with Python and PySide6 (Qt).
Download
Pre-built binaries are available from the latest release. No Python installation required.
| Platform | File | Notes |
|---|---|---|
| Linux | NatTypeTester-NG-linux |
Single executable, mark as executable with chmod +x |
| macOS | NatTypeTester-NG-macos |
Single executable, mark as executable with chmod +x |
| Windows | NatTypeTester-NG-windows.exe |
Double-click to run |
Quick Start
Linux / macOS:
chmod +x NatTypeTester-NG-linux # or NatTypeTester-NG-macos
./NatTypeTester-NG-linux
Windows:
Double-click NatTypeTester-NG-windows.exe or run from a terminal.
Overview
NatTypeTester-NG uses STUN (Session Traversal Utilities for NAT) protocols to identify what type of NAT a computer is behind. This is a port of the original .NET/WPF application to Python/Qt for true cross-platform support.
Features
-
Dual Protocol Support
- Classic RFC 3489 NAT type detection
- Modern RFC 5389/5780 behavior classification
-
Multiple Transports
- UDP
- TCP (modern test, currently not supported)
- TLS-over-TCP (modern test, currently not supported)
-
Pre-configured STUN Servers
- Google, Xiaomi, Hot Chilli, Syncthing, and more
- Custom server support
-
Modern UI
- Dark/light theme toggle
- Clear results display
- Copy results to clipboard
NAT Types Detected
Classic (RFC 3489)
- Open Internet
- Symmetric UDP Firewall
- Full Cone NAT
- Restricted Cone NAT
- Port Restricted Cone NAT
- Symmetric NAT
- UDP Blocked
Modern (RFC 5389/5780)
Mapping Behavior:
- Direct (no NAT)
- Endpoint Independent
- Address Dependent
- Address and Port Dependent
Filtering Behavior:
- Endpoint Independent
- Address Dependent
- Address and Port Dependent
Building from Source
Prerequisites
- Python 3.11 or higher
- pip package manager
Setup Development Environment
- Clone the repository:
git clone https://git.jdneer.com/jd/NatTypeTester-NG.git
cd NatTypeTester-NG
- Run the setup script:
./init.sh
Or manually:
python -m venv venv
source venv/bin/activate # On Linux/macOS
# On Windows: venv\Scripts\activate
pip install -r requirements.txt
Running from Source
source venv/bin/activate
python src/main.py
Building a Binary
The project includes a build script that uses PyInstaller to create a standalone executable:
Linux / macOS:
source venv/bin/activate
python scripts/build.py
Windows:
venv\Scripts\activate
python scripts/build.py
Options:
--clean— Remove previous build artifacts before building--verbose— Show detailed build output
The resulting binary will be placed in the dist/ directory.
Automated Builds (CI/CD)
GitHub Actions workflows automatically build binaries for all platforms on every push to tagged releases (v*). See the .github/workflows/ directory for details.
Network Requirements
The application requires outbound access to STUN servers:
- UDP/TCP port 3478 (standard STUN)
- TCP port 5349 (STUN over TLS)
Project Structure
NatTypeTester-NG/
├── src/
│ ├── core/ # Settings, configuration
│ ├── transport/ # UDP, TCP, TLS implementations
│ ├── protocol/ # STUN message handling
│ ├── ui/ # PySide6 widgets
│ └── main.py # Application entry point
├── scripts/
│ └── build.py # Automated build script
├── tests/ # Unit tests
├── init.sh # Setup script
└── requirements.txt # Python dependencies
Linux Desktop Integration
After building the application, you can integrate it into your Linux desktop environment:
# User-level install (no root required)
./install-linux.sh
# System-wide install
sudo ./install-linux.sh system
This installs the binary, desktop entry, and icons to standard XDG locations so NatTypeTester-NG appears in your GNOME, KDE, or other freedesktop-compatible application menu.
License
See LICENSE file for details.