Warpgate is a 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 and the public infrastructure is community-run.
Warpgate doesn't bet on a single technique. It runs a cascade of plugins — direct, reverse, hole-punch, probe, relay, port-map — in whatever order you configure. Write your own and drop it in.
Most NAT-traversal libraries hand you a problem: stand up your own STUN, TURN, signaling, key-distribution. Warpgate ships with a public constellation — and a monitoring service that watches it for you. Run your own when you need to. Don't, when you don't.
Peers swap candidates over public MQTT brokers. No bespoke rendezvous server to operate; sidewire handles the signaling.
Pooled across community STUN servers. Warpgate fans probes out and reconciles results to characterize the NAT in front of you.
When all else fails — symmetric NAT on both sides, locked-down corporate egress — Warpgate falls back through public TURN.
Skip the public-key gymnastics: claim a name with namebump, point peers at it. Or use raw addresses directly.
dogdorm probes public infrastructure servers. Constantly rating the most reliable and keeping an updated server list.
Each piece does one thing well, ships independently, and runs on the same public infrastructure. Use them together, or pull just the one you need.
The cascade. One-shot NAT traversal across eight plugins. Glue for everything below.
Custom async networking library that adds first-class multi-interface support to Python.
Signaling layer that passes peer messages over MQTT. Topic-per-peer, public brokers.
Open name registry. Claim a name, point peers at it — no public-key gymnastics required.
Watches public infrastructure for liveness. Tells Warpgate which servers are up before it tries.
Warpgate's pure-Python core targets the lowest common denominator on purpose. If you're maintaining a tool that has to ship to a Windows XP fleet, an embedded Linux box, a BSD jail, and an Android runtime — same library, same API.
Warpgate is a complete async network programming kit: the cascade for getting a socket, plus primitives for using it. Start a connection, accept inbound peers, multiplex multiple NICs, write your own strategy.
1# cascade through 8 plugins until one works 2import asyncio 3from warpgate import Gate 4 5async def main(): 6 gate = Gate(name="peer.alpha") 7 await gate.load_interfaces() # every NIC 8 9 pipe = await gate.connect("peer.bravo") 10 async with pipe: 11 await pipe.send(b"hello") 12 msg = await pipe.recv() 13 print(pipe.strategy, pipe.transport) 14 15asyncio.run(main()) 16 17# ⌬ direct — refused 18# ⌬ reverse — refused 19# ⌬ tcp-punch ✓ via simultaneous-open 20# tcp-punch tcp
1# accept inbound peers across every NIC and IP family 2import asyncio 3from warpgate import Gate 4 5async def handle(pipe): 6 async with pipe: 7 async for msg in pipe: 8 await pipe.send(msg) 9 10async def main(): 11 gate = Gate(name="echo.host") 12 await gate.load_interfaces(families=["v4", "v6"]) 13 await gate.listen(handle) 14 await asyncio.Future() 15 16asyncio.run(main())
1# your own plugin — drop into the cascade 2from warpgate import Strategy, register 3 4@register(priority=15) 5class QuicCoturn(Strategy): 6 name = "quic-coturn" 7 8 async def attempt(self, ctx): 9 if not ctx.peer.supports("quic"): 10 return self.skip() 11 sock = await ctx.turn.allocate("udp") 12 return await ctx.wrap_quic(sock)
Warpgate is MIT licensed — the library, every sibling project. No paid tier. No vendor lock-in. No telemetry phoning home. Fork it, ship it, run your own copy of every server.