Skip to main content
Mole connecting transports

Transport Protocols

Choose the right transport for your network environment. Use QUIC when you control the network, HTTP/2 or WebSocket when you need to get through firewalls and proxies.

Quick Guide

Your SituationUse This
Direct connection, no firewall issuesQUIC - fastest option
Corporate firewall blocks UDPHTTP/2 - looks like normal HTTPS
Must go through HTTP proxyWebSocket - maximum compatibility
Not sureStart with QUIC, fall back to WebSocket if blocked

Transport Comparison

TransportSpeedFirewall FriendlinessBest For
QUICFastestMedium (needs UDP)Data centers, home networks
HTTP/2GoodGoodCorporate networks
WebSocketFairExcellentRestrictive proxies, CDNs

QUIC Transport

QUIC (Quick UDP Internet Connections) is the recommended transport for most deployments.

Characteristics:

  • UDP with built-in TLS 1.3
  • Native stream multiplexing (no head-of-line blocking)
  • Lowest latency, best throughput
  • Fast 0-RTT reconnection
  • Modern congestion control (BBR)

When to use:

  • Connecting servers you control (cloud, data center)
  • Home or office network without strict firewalls
  • When speed matters (large file transfers, low latency)
  • Most residential ISP connections (UDP usually works)

Firewall considerations:

  • Requires UDP port to be open
  • May be blocked by corporate firewalls
  • NAT traversal generally works well
  • Some ISPs throttle or block UDP

HTTP/2 Transport

HTTP/2 provides a TCP-based alternative with good firewall compatibility.

Characteristics:

  • TCP with TLS 1.3
  • HTTP/2 stream multiplexing
  • Good performance, but TCP head-of-line blocking
  • Compatible with most firewalls and proxies

When to use:

  • Corporate network that blocks UDP
  • Behind a load balancer or reverse proxy
  • Need to blend with normal HTTPS traffic
  • QUIC is being blocked or throttled

Firewall considerations:

  • Uses standard HTTPS port (443)
  • Passes through most corporate firewalls
  • Compatible with HTTP proxies (without CONNECT)
  • Can be hosted behind reverse proxies

WebSocket Transport

WebSocket provides maximum compatibility, especially through HTTP proxies.

Characteristics:

  • HTTP upgrade to WebSocket, then framed messages
  • Application-level multiplexing over single connection
  • Highest overhead, most latency
  • Works through HTTP proxies with CONNECT

When to use:

  • Must go through a corporate HTTP proxy
  • Network inspects and blocks non-HTTP traffic
  • Hosting behind a CDN or WAF
  • Maximum compatibility is more important than speed

Firewall considerations:

  • Uses standard HTTP/HTTPS ports
  • Works through HTTP proxies with CONNECT
  • Compatible with most corporate environments
  • May work through some WAFs and CDNs
Plain WebSocket Mode

When behind a reverse proxy handling TLS termination, use plaintext: true to accept unencrypted WebSocket connections on localhost. See Reverse Proxy Deployment.

Performance Comparison

Latency (per hop)

TransportLANWAN
QUIC1-2ms50-100ms
HTTP/22-5ms60-150ms
WebSocket3-10ms80-200ms

Connection Establishment

TransportInitialReconnect
QUIC1-RTT0-RTT
HTTP/22-RTT1-RTT (TLS resumption)
WebSocket2-RTT + HTTP upgrade2-RTT

Throughput

TransportSingle StreamMulti-Stream
QUICExcellentExcellent
HTTP/2GoodGood
WebSocketFairFair

Mixed Transport Deployments

You can mix transports in a single mesh. Each peer connection chooses the best transport for that specific link:

Routes propagate across all transports - traffic finds the best path regardless of underlying protocol.

Selection Guide

Where You AreWhere You're ConnectingUse
Home networkCloud serverQUIC
Office (no proxy)Cloud serverQUIC or HTTP/2
Corporate laptopThrough corporate proxyWebSocket
Cloud serverAnother cloud serverQUIC
Behind CDN/WAFAnywhereWebSocket
AnywhereServer behind reverse proxyHTTP/2 or WebSocket

Next Steps