Improves security, there wasn't an issue but for future updates when I allow 3rd party relays.
NOT BACKWARDS COMPATIBLE
What's New in Version 1.4.6
Multi-Port Forwarding System
Tunnely now supports forwarding additional ports beyond Minecraft, enabling voice chat mods and other services to work seamlessly through the tunnel. This system includes:
- Automatic Mod Detection - Detects installed mods like Simple Voice Chat and Plasmo Voice
- UDP Protocol Support - Full UDP forwarding for voice chat and other real-time services
- Per-Port Rate Limiting - Optimized bandwidth allocation (100 packets/sec for voice, 50 for others)
- Packet Size Validation - Prevents fragmentation and bandwidth abuse (2KB limit)
- Auto-Retry Logic - Automatic recovery from transient socket failures with exponential backoff
- Port Conflict Detection - Validates port availability before starting to prevent startup failures
- Graceful Failure Handling - Main Minecraft connection continues even if additional ports fail
- Status Indicators - Visual UI feedback showing which services are active and any port conflicts
Supported services include:
- Simple Voice Chat (port 24454/UDP) - Auto-enabled by default
- Plasmo Voice (configurable port, auto-detected from config)
- Any mod requiring additional TCP/UDP port forwarding
Increased Player Capacity
Integrated servers (singleplayer worlds opened to LAN) now support up to 20 players, up from the vanilla limit of 8. Perfect for hosting larger community events and friend group sessions without needing a dedicated server.
Enhanced Error Messages
Port forwarding now provides detailed, actionable error messages with solutions:
- Clear identification of which port is in use
- Specific guidance for administrator permissions
- Firewall configuration suggestions
- Automatic conflict resolution recommendations
Fixes rejoining after leaving, and improves compression
Fixes an issue with reconnecting after rejoining and improves compression.
Tunnely v1.4.4 - Multi-Hop Relay Routing
Release Date
October 3, 2025
Overview
This release introduces an intelligent multi-hop relay routing system that automatically optimizes player connections by routing traffic through data center backbone networks, similar to how VPNs optimize routes. This results in 30-50% latency reduction for cross-region connections.
Major Features
Multi-Hop Relay Routing System
- Automatic Route Optimization: Dijkstra's algorithm finds the best path through relay mesh networks
- Data Center Backbone Routing: Routes traffic through high-priority DC-to-DC connections instead of congested residential ISP peering
- Self-Healing Network: Automatically detects degraded connections and re-routes within 60 seconds
- Zero Configuration: Works automatically for all players with no manual setup required
Performance Improvements
- Cross-region latency reduced by 30-50% (e.g., LA to Atlanta: 180ms -> 53ms)
- Stable, predictable latency through data center backbone networks
- Intelligent heuristics avoid multi-hop when not beneficial (same-region connections)
- Concurrent relay latency probing for fast route discovery
Relay Mesh Infrastructure
- Relay-to-relay latency monitoring (automatic measurement every 30 seconds)
- Mesh topology database with relay connection tracking
- Inter-relay tunneling protocol with HMAC-SHA256 authentication
- Support for up to 3-hop routes with configurable limits
Network Quality Monitoring
- Real-time latency, packet loss, and jitter tracking
- Moving average calculations with 20-sample circular buffer
- Automatic degradation detection with configurable thresholds
- Adaptive re-routing when network quality degrades
Technical Changes
Database
- New
relay_connectionstable for storing relay-to-relay latency measurements - New
optimal_routestable for caching pre-computed routes - New SQL functions:
get_relay_mesh_topology(),update_relay_connection(),find_optimal_route(),get_relay_mesh_stats() - Performance indexes on relay mesh queries
Relay Server
- New mesh monitoring module (
mesh-monitor.js) for automatic peer discovery and latency measurement - New relay tunnel module (
relay-tunnel.js) for inter-relay packet forwarding - New
/relay-meshWebSocket endpoint for peer-to-peer connections - New
/meshHTTP endpoint for topology queries - Enhanced
/metricsendpoint with mesh statistics
Java Client
- New
RouteOptimizerclass implementing Dijkstra's algorithm with hop penalties - New
RelayMeshProberclass for concurrent relay latency measurement - New
NetworkQualityMonitorclass for connection quality tracking - New methods in
SupabaseClient:getRelayMeshTopology(),getRelayMeshStats()
Configuration
New Environment Variables (Relay Server)
RELAY_MESH_SECRET: Shared secret for relay-to-relay authentication (required for mesh)
Existing Variables (Enhanced)
RELAY_ID: Now used for mesh node identificationRELAY_REGION: Now used for route optimization decisions
Security
- HMAC-SHA256 authentication for relay-to-relay connections
- Timestamp validation with 5-minute window to prevent replay attacks
- Timing-safe token comparison to prevent timing attacks
- TLS encryption (wss://) for all relay mesh connections
- Hop count tracking to prevent infinite routing loops
Deployment Notes
- Fully backward compatible with existing single-hop relay deployments
- Relays without mesh support continue functioning normally
- Run
supabase/create-relay-mesh-tables.sqlto enable mesh features - Set consistent
RELAY_MESH_SECRETacross all relay servers in the mesh - No client updates required - route optimization happens automatically
Documentation
- New comprehensive guide:
MULTI-HOP-ROUTING.md(technical deep-dive) - New quick start guide:
MULTI-HOP-QUICKSTART.md(5-minute deployment) - New implementation summary:
MULTI-HOP-IMPLEMENTATION-SUMMARY.md - New code review document:
MULTI-HOP-CODE-REVIEW.md
Performance Metrics
- Latency overhead per hop: 10-15ms (relay forwarding)
- Bandwidth cost multiplier: 1x (single-hop), 2x (2-hop), 3x (3-hop)
- Route computation: O(E log V) using Dijkstra's algorithm
- Mesh monitoring interval: 30 seconds (configurable)
- Re-routing check interval: 60 seconds (configurable)
Known Limitations
- Maximum 3 hops per route (configurable, can be reduced to 2)
- Bandwidth cost increases linearly with hop count
- Initial mesh measurement takes 30 seconds after relay startup
- Multi-hop only beneficial for cross-region connections
Upgrade Instructions
- Update mod to v1.4.4
- Run
create-relay-mesh-tables.sqlin Supabase SQL Editor - Set
RELAY_MESH_SECRETenvironment variable on all relay servers (use same value) - Restart relay servers
- Verify mesh is active by checking
https://your-relay.com/meshendpoint
Breaking Changes
None - fully backward compatible with v1.4.3 and earlier.
Bug Fixes
None in this release (new feature release).
Fixes UI bugs, inactive servers not getting deleted from database, and messages duplicating in the chat screen
Fixes UI bugs, inactive servers not getting deleted from database, and messages duplicating in the chat screen
Improved UI design and added password reset
improved UI design and added password reset option
Added Friend System and Messaging System
added compression between client and relay so we can afford to add south america and africa relays as data is more expensive there.
added compression between client and server so we can afford to host servers in regions like South America and Africa where data is expensive
Tunnely 1.2.0 - Regional Relay Network Update
Release Date: October 1, 2025
Minecraft Version: 1.20.1
Loaders: Fabric, Forge
Major Features
Multi-Regional Relay Network
- 3 Global Relay Servers:
- NA 1 - Atlanta, USA (Serving North & South America)
- EU 1 - Frankfurt, Germany (Serving Europe, Middle East & Africa)
- APAC 1 - Singapore (Serving Asia-Pacific)
- Automatic Relay Selection: Measures latency to all relays and connects to the fastest one
- Intelligent Failover: Automatically switches to next-best relay if primary fails
- Zero Configuration: Works out of the box with optimal relay selection
Database-Backed Relay Discovery
- Relay list fetched from central database (with config fallback)
- Dynamic relay updates without client mod updates
- Priority-based relay selection
- Maintenance mode support (relays can be temporarily disabled)
Regional Filtering in Public Lobby
- Region Badges: Each server displays its relay region (🌎 NA, 🌎 EU, 🌎 APAC)
- Dynamic Region Filter: Cycle through regions that have active servers
- Filter adapts automatically: if SA relay is down, SA option is hidden
- Filter options: ALL → (detected regions only, sorted alphabetically)
- Status Display: Shows total servers and compatible count
UI/UX Improvements
Public Lobbies Screen
- Fixed: "Show only compatible" checkbox now works reliably
- Instant client-side filtering (no refetch required)
- Cached server data for responsive toggling
- Fixed: Button unresponsiveness after clicking Refresh
- Proper focus management on server list
- UI state properly restored after async load
- Fixed: Concurrent load protection
- Load-in-progress guard prevents overlapping requests
- Controls disabled during load, re-enabled on completion
- Improved: Server list layout
- Increased spacing from bottom controls to prevent click overlap
- Better visual separation between list and buttons
Compatibility Filtering
- Checkbox toggles instantly without network delay
- Smooth transitions when filtering servers
- Clear visual feedback on filter state
Technical Improvements
Relay Server Enhancements
- Configurable Public Endpoint:
RELAY_PUBLIC_HOSTandRELAY_PUBLIC_PORTenvironment variables- No more hardcoded IPs in source code
- Easy deployment behind reverse proxies
- Health Endpoint Metadata:
/healthnow includesregionandrelayId- Used by clients for latency-based selection
- Updated Rate Limiting:
- Token refill rate increased to 1000/sec for better gameplay experience
Client-Side Architecture
- Relay Discovery Flow:
- Fetch active relays from database via
getAvailableRelays() - Merge with config-based backup relays
- Ping all relays'
/healthendpoints (2s timeout) - Sort by latency and store for failover
- Connect to fastest relay
- Fetch active relays from database via
- Server Registration:
- Stores relay metadata (
relay_id,relay_region,relay_url) in database - Enables region display and filtering in public lobby
- Stores relay metadata (
- Failover Logic:
- Attempts connection to sorted relay list in order
- Logs detailed failover attempts for debugging
- Graceful degradation to config fallback
️ Database Schema Changes
New Tables
relaystable:id(text, PK): Unique relay identifierregion(text): Geographic region codeurl(text): WebSocket URLstatus(text): active/maintenance/disabledpriority(integer): Lower = higher prioritymetadata(jsonb): Extensible field for future features- Indexes on
status,region,priorityfor fast queries
Updated Tables
serverstable:- Added
relay_id(text): ID of relay used by server - Added
relay_region(text): Region of relay used by server - Added
relay_url(text): URL of relay used by server - Indexes added for efficient region filtering
- Added
Row-Level Security
- Anyone can read
activerelays (required for discovery) - Only service role can modify relay records
Configuration Changes
Client Config (tunnelyrefab.json)
- New field:
relays(array of RelayEndpoint objects)- Each entry:
{id: string, region: string, url: string} - Used as backup if database fetch fails
- Backward compatible with single
relayServerUrl
- Each entry:
Relay Server Config (.env)
- New variables:
RELAY_ID- Unique identifier for relay instanceRELAY_REGION- Geographic region code (NA/EU/APAC/SA)RELAY_PUBLIC_HOST- Public hostname/IP for endpoint generationRELAY_PUBLIC_PORT- Public port for endpoint generation
Documentation
New Documentation
MULTI-RELAY-SETUP.md- Comprehensive guide for:- Deploying multi-relay infrastructure
- Database migration steps
- Relay server configuration
- Troubleshooting common issues
- Best practices for relay management
Updated Documentation
modrinth.md- Added Multi-Regional Relay Network sectionrelay-server/.env.example- Added new environment variables with comments
Bug Fixes
- Fixed checkbox unresponsiveness in public lobby after multiple clicks
- Fixed button focus issues after async server list reload
- Fixed region filter sometimes showing empty regions
- Fixed concurrent load requests causing UI state corruption
- Fixed server list overlapping bottom control buttons
Security & Performance
- Maintained all existing security features (JWT auth, HMAC handshake, TLS encryption)
- No new security surface area introduced
- Improved performance: client-side filtering eliminates redundant network calls
- Reduced database load: cached server list for instant filter toggling
⚙ Deployment Notes
For Self-Hosters
- Run new SQL migrations:
supabase/add-relay-fields.sqlsupabase/create-relays-table.sql
- Update relay server
.envfiles with new variables - Insert relay records into database
- Optional: Add backup relays to client config
For Users (Default Infrastructure)
- No action required - Update automatically uses regional relay network
- Existing config files remain compatible
- Automatic relay selection works out of the box
Acknowledgments
Thank you to all users who reported UI issues and suggested regional relay support. Your feedback directly shaped this release!
Download
- Fabric:
tunnelyrefab-fabric-1.2-SNAPSHOT.jar - Forge:
tunnelyrefab-forge-1.2-SNAPSHOT.jar - Requires: Architectury API (dependency)
What's Next?
Future updates may include:
- Additional relay regions (South America, Middle East)
- Relay performance metrics dashboard
- Advanced filtering options in public lobby
- Custom relay server support for organizations
Support
- Discord: Join our community
- Documentation: See
README.mdandMULTI-RELAY-SETUP.md - Ko-fi: Support infrastructure costs
Improved Dedicated server support, and tab complete for the commands.


