HELLO & WELCOME, NETIZEN!! You have stumbled upon the OFFICIAL HOMEPAGE of WARPGATE — the most RADICAL Python library for punching holes through your Network Address Translator!!! NEW!
Are PESKY FIREWALLS getting in the way of your peer-to-peer dreams? Has your router told you for the LAST TIME that port 51820 is unreachable?? Then friend, you NEED WARPGATE!
Warpgate is a 100% FREE, 100% OPEN-SOURCE Python 3 library for one-shot NAT traversal. EIGHT plugins, every major OS back to Windows XP, IPv4 AND IPv6, multi-NIC, all in one library. No relays you have to run. No keys you have to manage. No paid tier EVER! The code is MIT licensed and the public infrastructure is community-run!!
It's EASY!! Just open up your DOS prompt or terminal and type:
That's it!! No funny business, no secret handshakes, no nonsense. Once installed you can see the code examples below, or jump straight to the official source repository on GitHub.
★ License: MIT ★ Cost: $0.00 FOREVER ★ Python: 3.5 or higher ★
Warpgate doesn't bet on a single technique. It runs a CASCADE of plugins until ONE works. Click each plugin to learn more (just kidding, this is a 90s page, just READ the descriptions!!)
| [ 01 ] Direct Connect | [ 02 ] Reverse Connect | [ 03 ] TCP Punch | [ 04 ] UDP Hole-Punch |
| [ 05 ] UDP Random Probe | [ 06 ] UPnP / IPv6 Pinhole | [ 07 ] TURN Relay | [ 08 ] Bring Your Own! |
Here is a scientifically accurate diagram of how Warpgate makes two computers behind nasty NATs talk to each other!!
* Diagram not to scale. Actual NAT may vary. Warpgate has 8 strategies it cycles through automatically.
Here is how you would use Warpgate in your OWN Python program!!
▼ connect to a peer ▼
▼ write your own plugin ▼
Warpgate works EVERYWHERE!! See for yourself!!
| Operating System | Tested? | Notes |
|---|---|---|
| Windows XP | YES! | Yes really. Try it. |
| Windows Vista / 7 / 8 / 10 / 11 | YES! | Primary target. |
| Linux (kernel 2.6+) | YES! | Distro-agnostic. |
| macOS (10.9 — Sequoia) | YES! | Intel + Apple Silicon. |
| FreeBSD / OpenBSD / NetBSD | YES! | Jails supported. |
| Android (Termux + Pydroid) | YES! | Phones tunnel too!! |
| iOS (Pythonista) | SORTA | Read-only sockets. |
| OS/2 Warp | UNTESTED | Send patches! |
Python: 3.5 → 3.13. Async-native from Python 3.5's first asyncio. CPython is the primary target, but PyPy works fine too!
Warpgate isn't alone! It is part of a WHOLE FAMILY of cooperating open-source libraries:
| CORE ★★★★★ |
warpgate — (this one!)
The cascade. One-shot NAT traversal across eight plugins.
|
| NETIO |
aionetiface
Custom async networking library that adds first-class multi-interface support to Python.
|
| SIGNAL |
sidewire
Peers swap candidates over public MQTT brokers — no bespoke rendezvous server.
|
| NAMING |
namebump
Skip the public-key gymnastics. Claim a name, point peers at it.
|
| MONITOR |
dogdorm
Probes public infrastructure servers — keeps Warpgate's server list fresh.
|