Tunnely-P2P

Tunnely-P2P

Mod

Fork of Tunnely, but fully p2p, no backend relay or database just free multiplayer.

Client

65 downloads
1 follower
Follow Save

Tunnely P2P - Direct Peer-to-Peer Multiplayer

⚠️ Important: Read Before Installing

Most users should use regular Tunnely instead of this P2P version.

Tunnely P2P requires either port forwarding OR compatible NAT types between both players. Many routers and ISPs use restrictive NAT configurations (Symmetric NAT, Carrier-Grade NAT) that prevent direct peer-to-peer connections from working, which means you'll still need to port forward.

Use regular Tunnely if:

  • ❌ You don't know how to port forward if required
  • ❌ Your ISP uses Carrier-Grade NAT (CGNAT)
  • ❌ You're behind a restrictive firewall (school, workplace, etc.)
  • ❌ You just want it to work without networking knowledge

Only use Tunnely P2P if:

  • ✅ You can port forward and understand networking
  • ✅ You want maximum privacy (no relay servers, no accounts)
  • ✅ You're willing to troubleshoot NAT traversal issues

Which Tunnely is Right for You?

There are two versions of Tunnely designed for different use cases:

🔗 Tunnely P2P (This Mod - You're Here!)

Best for: Private gaming sessions, direct connections, maximum privacy

Key Features:

  • 100% Direct Peer-to-Peer - No relay servers, no third-party infrastructure
  • Zero Configuration - Share a token, connect instantly
  • Complete Privacy - No data collection, no accounts, no tracking
  • Lightweight - Minimal resource usage, no external dependencies
  • Self-Contained - Works entirely offline after initial connection
  • Token-Based - Simple connection tokens, no account registration
  • End-to-End Encryption - ChaCha20-Poly1305 AEAD with X25519 key exchange
  • Forward Secrecy - Ephemeral keys for maximum security
  • Open Source - Fully auditable code

How It Works:

  1. Host generates a connection token
  2. Host shares token with friends (copy/paste, Discord, etc.)
  3. Friends use token to connect directly
  4. No servers, no accounts, no middleman

Perfect For:

  • Small friend groups (2-4 players)
  • Private gaming sessions
  • Privacy-conscious users
  • Users who don't want to create accounts
  • Direct connections with minimal latency

Limitations:

  • No server browser or discovery features
  • No friend list or social features
  • Token must be manually shared (Discord, text, etc.)
  • Limited to direct peer-to-peer connections
  • Requires port forwarding OR both players behind compatible NAT

🌐 Tunnely (Alternative Version)

Best for: Public servers, communities, modpacks, server discovery

Key Features:

  • No Port Forwarding Required - Works from anywhere
  • Server Browser - Discover public servers, see friends' servers
  • Social Features - Friends list, invites, online status
  • Global Relay Network - Multi-region mesh routing (NA, EU, APAC)
  • Automatic Compatibility Detection - Version/mod checking
  • Three Visibility Modes - Public, Friends Only, Invite Only
  • Authentication System - Secure JWT-based accounts
  • Bandwidth Compression - 50-80% reduction with GZIP
  • Multi-Port Forwarding - Voice chat mod support
  • Up to 20 Players - Increased from vanilla 8 player limit

How It Works:

  1. Create account (email + password)
  2. Host server with chosen visibility mode
  3. Friends find server in browser OR receive invite
  4. Relay infrastructure handles all networking

Perfect For:

  • Public servers and communities
  • Modpack hosting
  • Friend groups who want server discovery
  • Users who need no port forwarding
  • Multi-region gaming (mesh routing optimizes latency)
  • Voice chat integration (Simple Voice Chat, Plasmo Voice)

Trade-offs:

  • Requires account creation
  • Relies on relay infrastructure
  • Small additional latency (20-50ms, optimized by mesh routing)
  • Data stored in database (email, server info)

Side-by-Side Comparison

Feature Tunnely P2P Tunnely
Account Required ❌ No ✅ Yes (email + password)
Port Forwarding ⚠️ May be needed ❌ Not required
Privacy 🟢 Maximum (no data collection) 🟡 High (minimal data)
Latency 🟢 Direct (lowest possible) 🟡 +20-50ms (mesh optimized)
Setup Complexity 🟢 Very Simple (token only) 🟡 Simple (account creation)
Server Discovery ❌ No ✅ Public browser + friends list
Social Features ❌ No ✅ Friends, invites, online status
Max Players ⚠️ Depends on host bandwidth ✅ Up to 20 (increased limit)
Infrastructure ❌ None needed ✅ Relay servers (free)
Self-Hostable ✅ N/A (fully P2P) ✅ Yes (optional)
Voice Chat Support ⚠️ Limited ✅ Full multi-port forwarding
Bandwidth Compression ❌ No ✅ Yes (50-80% savings)
Works Behind NAT ⚠️ Compatible NAT required ✅ Always works
Data Collection ❌ None ⚠️ Minimal (email, server name)
Open Source ✅ Yes ✅ Yes

When to Choose Tunnely P2P

Choose Tunnely P2P if you:

  • 🔒 Value Privacy Above All - No accounts, no data collection, no tracking
  • 👥 Play with Small Groups - 2-4 friends in private sessions
  • 🚀 Want Lowest Latency - Direct connections with no relay overhead
  • 🛠️ Can Handle Port Forwarding - Or both players have compatible NAT
  • 📱 Already Use Discord/Messages - Comfortable sharing tokens manually
  • 🔐 Want Maximum Security - End-to-end encryption with forward secrecy
  • Need Minimal Setup - No accounts, no configuration, just works

When to Choose Tunnely

Choose Tunnely if you:

  • 🌍 Host Public Servers - Want server browser discovery
  • 👫 Have Large Friend Groups - Need friend lists and invites
  • 🚫 Can't Port Forward - Behind restrictive firewalls or NAT
  • 🎮 Run Modpacks - Need automatic compatibility detection
  • 🗺️ Play Multi-Region - Benefit from mesh relay routing
  • 🎤 Use Voice Chat Mods - Simple Voice Chat, Plasmo Voice support
  • 📊 Host Larger Servers - Up to 20 players with compression
  • 🔍 Want Server Discovery - Public lobby browser with filters

Can I Use Both?

Yes! Both mods can coexist:

  • Install both Tunnely P2P and Tunnely
  • Use P2P for private sessions with close friends
  • Use Tunnely for public servers and community events
  • Commands and UI are separate and don't conflict

Getting Started with Tunnely P2P

Installation

  1. Install Architectury API (required dependency)
  2. Install Tunnely P2P - Download from Modrinth, place in mods/ folder
  3. Launch Minecraft 1.20.1

Hosting

Option 1: In-Game GUI

  • Open any world to LAN
  • Use the tunnel status screen to create a session
  • Copy the connection token
  • Share token with friends (Discord, text, etc.)

Option 2: Commands

/tunnel create           # Generate connection token
/tunnel token            # Display current token
/tunnel status           # View connection status
/tunnel stop             # Stop hosting

Joining

  1. Receive connection token from host
  2. Use command: /tunnel connect <token>
  3. Or open multiplayer screen and connect to 127.0.0.1:25999

That's it! No accounts, no configuration, no hassle.


Switching to Tunnely (Full Version)

Want the server browser, social features, and relay infrastructure?

Download Tunnely

Quick Setup

  1. Install Tunnely (can keep P2P installed alongside)
  2. Press U key in-game to open menu
  3. Click Login/Register to create account
  4. Start hosting with Host Game button
  5. Choose visibility mode and start!

Features You'll Get

  • 🔍 Server Browser - Discover public servers
  • 👥 Friends System - Add friends by email, see who's online
  • 📨 Invites - Send direct invitations to your server
  • 🌍 Multi-Region Relays - NA, EU, APAC with mesh routing
  • Compatibility Detection - Automatic version/mod checking
  • 🗜️ Bandwidth Compression - 50-80% reduction
  • 🎤 Voice Chat Support - Multi-port forwarding
  • 👥 Up to 20 Players - Increased limit with compression

Technical Details

Tunnely P2P Architecture

┌─────────────┐                    ┌─────────────┐
│   Host PC   │ ← Direct P2P  →  │  Client PC  │
│ (generates  │   Connection      │  (uses      │
│   token)    │   (encrypted)     │   token)    │
└─────────────┘                    └─────────────┘

Security:

  • ChaCha20-Poly1305 AEAD encryption
  • X25519 Elliptic Curve Diffie-Hellman key exchange
  • HKDF-SHA256 key derivation
  • Perfect forward secrecy
  • No data leaves your connection

Tunnely Architecture

┌───────────┐    WSS/GZIP    ┌──────────────┐    Mesh     ┌──────────────┐
│ Host PC   │───────────────→│  Relay NA    │◄──────────→│  Relay EU    │
└───────────┘  Encrypted     └──────────────┘  Routing    └──────────────┘
                                    ↓                            ↓
                             ┌──────────────┐            ┌──────────────┐
                             │ Supabase DB  │            │  Client PC   │
                             └──────────────┘            └──────────────┘

Security:

  • TLS/WSS encryption for relay connections
  • JWT authentication via Supabase
  • Row-Level Security on database
  • Rate limiting and DDoS protection
  • AES-256-GCM token encryption

Support & Resources

Tunnely P2P (This Mod)

  • GitHub: [Repository URL]
  • Issues: Report bugs on GitHub
  • License: MIT
  • Status: Open source, self-contained

Tunnely (Full Version)


FAQ

Q: Do I need both mods? A: No, choose one based on your needs. They can coexist if you want both options.

Q: Which is more secure? A: Both are secure. P2P has no data collection, Tunnely has minimal data (email, server name). P2P has no relay servers, Tunnely encrypts all relay traffic.

Q: Can P2P friends join Tunnely servers? A: No, they're separate systems. P2P uses tokens, Tunnely uses database-backed endpoints.

Q: Is Tunnely P2P really free? A: Yes, 100% free with zero infrastructure costs. No servers, no subscriptions.

Q: Is Tunnely free? A: Yes, free to use with public relay servers. Optional Ko-fi donations help maintain infrastructure. Fully self-hostable if you prefer.

Q: Which has lower latency? A: P2P has direct connections (lowest possible). Tunnely adds 20-50ms but optimizes multi-region connections via mesh routing.

Q: Do joining players need the mod? A: Neither version requires joining players to install the mod (host only).

Q: Can I switch between them? A: Yes, they're separate mods. Install one or both as needed.


Conclusion

Choose Tunnely P2P if you want:

  • ✅ Maximum privacy and security
  • ✅ Zero configuration
  • ✅ Direct connections
  • ✅ No accounts or data collection
  • ✅ Small private sessions

Choose Tunnely if you want:

  • ✅ Server browser and discovery
  • ✅ Social features (friends, invites)
  • ✅ No port forwarding required
  • ✅ Multi-region relay support
  • ✅ Voice chat integration
  • ✅ Larger player capacity

Both are free, open-source, and built for the community!


Made with ❤️ for the Minecraft community

Try Tunnely (full version): https://modrinth.com/mod/tunnely


Project members

Bobcat

Member

Details

Licensed ARR
Published a month ago
Updated a month ago