Skip to content

Instantly share code, notes, and snippets.

@andrewarrow
Last active May 2, 2025 12:56
Show Gist options
  • Save andrewarrow/d0e41dd954485a8574b9ea74fbfc017f to your computer and use it in GitHub Desktop.
Save andrewarrow/d0e41dd954485a8574b9ea74fbfc017f to your computer and use it in GitHub Desktop.
Comparison of NAT Traversal Solutions

Comparison of NAT Traversal Solutions

Solution Pros Cons
connet • True peer-to-peer architecture with clients on both ends
• Enhanced privacy (traffic doesn't pass through central servers)
• Better performance through direct connections when possible
• All communications encrypted with TLS
• Granular access control with mandatory tokens
• Relay fallback when direct connections aren't possible
• Can be embedded in other Go applications
• Supports various transport protocols (TCP, UDP via QUIC)
• Newer project with smaller community
• Requires clients on both source and destination
• Currently in alpha status
• More complex setup compared to ngrok
• Requires understanding of both source and destination concepts
rathole • Extremely lightweight (binary as small as ~500KB)
• Optimized for resource-constrained devices
• High performance with larger bandwidth than alternatives
• Written in Rust for safety and speed
• Mandatory token-based security
• Hot reload capability for dynamic configuration
• Supports both TCP and UDP protocols
• Flexible encryption options (Noise Protocol, TLS)
• Low memory footprint
• Traditional client-server model (not P2P)
• Requires a server with public IP
• Smaller community than FRP
• Configuration split between client and server sides
• Limited web interface options
FRP • Mature project with strong community support
• Frequent updates and active development
• Supports TCP, UDP, HTTP and HTTPS protocols
• P2P connect mode available for direct connections
• Well-documented with many examples
• Extensive configuration options
• Good balance of features and performance
• Higher resource consumption than rathole
• Traditional client-server model as primary architecture
• More complex configuration than ngrok
• P2P mode not as central to design as connet
• Requires more setup for production environments
ngrok • Extremely simple setup and usage
• Works instantly with minimal configuration
• Well-established commercial service
• Global infrastructure for reliable performance
• Offers free and paid plans
• Advanced features like custom domains and auth
• Detailed analytics and observability
• No need to maintain your own server
• Excellent documentation and support
• Closed source and proprietary
• Free tier has limitations (connections, bandwidth)
• No peer-to-peer capabilities
• All traffic goes through ngrok servers
• Less privacy than self-hosted solutions
• Can be expensive for production use cases
• Less flexibility than open-source alternatives
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment