Are you an LLM? You can read better optimized documentation at /en\wiki\tuic.md for this page in Markdown format
TUIC protocol
TUIC (TCP over UDP-based Internet Connection) is a modern proxy protocol built on QUIC, designed for high-performance, low-latency network environments.
Characteristics
- 🚀 QUIC-based: built on the Google QUIC stack for excellent performance
- 📡 UDP transport: runs over UDP to reduce latency
- 🔐 Encryption built in: integrates TLS 1.3 and ChaCha20
- 🎮 Low latency: supports 0-RTT connection establishment
- 🔄 Multiplexing: avoids head-of-line blocking
- 🛡️ Congestion control: ships with advanced congestion control algorithms
Configuration examples
Basic configuration
json
{
"outbounds": [
{
"type": "tuic",
"tag": "tuic-out",
"server": "example.com",
"server_port": 443,
"uuid": "your-uuid-here",
"password": "your-password",
"congestion_control": "bbr",
"tls": {
"enabled": true,
"server_name": "example.com",
"certificate_path": "/path/to/certificate.crt",
"key_path": "/path/to/private.key"
}
}
]
}Full configuration
json
{
"outbounds": [
{
"type": "tuic",
"tag": "tuic-full-out",
"server": "example.com",
"server_port": 443,
"uuid": "your-uuid-here",
"password": "your-password",
"congestion_control": "bbr",
"udp_relay_mode": "native",
"udp_over_stream": false,
"zero_rtt_handshake": true,
"heartbeat": 10,
"tls": {
"enabled": true,
"server_name": "example.com",
"certificate_path": "/path/to/certificate.crt",
"key_path": "/path/to/private.key"
}
}
]
}Advanced configuration
UDP relay modes
Native mode
json
{
"outbounds": [
{
"type": "tuic",
"tag": "tuic-udp-native-out",
"server": "example.com",
"server_port": 443,
"uuid": "your-uuid-here",
"password": "your-password",
"udp_relay_mode": "native",
"tls": {
"enabled": true,
"server_name": "example.com"
}
}
]
}QUIC mode
json
{
"outbounds": [
{
"type": "tuic",
"tag": "tuic-udp-quic-out",
"server": "example.com",
"server_port": 443,
"uuid": "your-uuid-here",
"password": "your-password",
"udp_relay_mode": "quic",
"tls": {
"enabled": true,
"server_name": "example.com"
}
}
]
}Congestion control algorithms
BBR
json
{
"congestion_control": "bbr"
}Cubic
json
{
"congestion_control": "cubic"
}NewReno
json
{
"congestion_control": "new_reno"
}Protocol details
Why QUIC
- 0-RTT connections: zero round-trip connection establishment
- Multiplexing: avoids TCP head-of-line blocking
- Connection migration: connections survive network changes
- Forward error correction: lost packets are recovered automatically
- Congestion control: several algorithms built in
TUIC specifics
- Dual authentication: UUID plus password
- UDP forwarding: efficient UDP relay
- Flow control: fine-grained traffic control
- Heartbeat: keeps connections stable
- Tuning: optimized for different network conditions
Congestion control comparison
| Algorithm | Latency | Throughput | Stability | Best for |
|---|---|---|---|---|
| BBR | Low | High | Stable | High bandwidth-delay products |
| Cubic | Medium | High | Stable | General use |
| NewReno | Medium | Medium | Stable | Simple environments |
Use cases
High throughput
- Large file transfers and downloads
- HD video streaming
- Real-time audio and video calls
- Cloud gaming
Low latency
- Online game acceleration
- Real-time trading systems
- Remote desktop
- Video conferencing
Enterprise
- Distributed system communication
- Microservice networks
- Database replication
- CDN acceleration
Pros and cons
Pros
- Excellent performance thanks to the modern QUIC stack
- 0-RTT establishment keeps latency very low
- Multiplexing avoids head-of-line blocking
- Multiple congestion control algorithms
- Efficient UDP forwarding
- Traffic characteristics are not obvious
Cons
- Requires UDP support on the network
- A relatively new protocol with an immature ecosystem
- May be blocked in some network environments
- Configuration is comparatively complex
- Requires TLS certificates
Comparison with other protocols
| Protocol | Latency | Throughput | Stability | Compatibility | Anti-detection |
|---|---|---|---|---|---|
| TUIC | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ |
| Hysteria2 | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ |
| VLESS | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| VMess | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |
| Trojan | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
Performance tuning
Server side
- Enable BBR: better congestion control
- Tune UDP: configure appropriate UDP buffers
- Use ECC certificates: better TLS performance
- Pick a good route: choose high-quality network paths
Client side
- Choose a suitable congestion control algorithm
- Enable 0-RTT
- Set a sensible heartbeat interval
- Pick the best UDP relay mode
Network
- Make sure UDP ports are open
- Configure an appropriate MTU
- Optimize DNS resolution
- Prefer nearby server nodes
Troubleshooting
Connection problems
- Check whether the UDP port is open
- Confirm the server supports TUIC
- Verify the UUID and password
- Check firewall rules
Performance problems
- Adjust the congestion control algorithm
- Check the packet loss rate
- Optimize the TLS configuration
- Choose a suitable UDP mode
Stability problems
- Adjust the heartbeat interval
- Check server load
- Enable connection retries
- Distribute load across multiple servers
Security recommendations
- Enforce TLS: always enable TLS in production
- Strong credentials: use complex UUIDs and passwords
- Protect certificates: store TLS certificates and private keys safely
- Access control: restrict which users and IPs may connect
- Monitor logs: watch for abnormal connections and traffic patterns
Deployment notes
Server requirements
- A network that supports UDP
- A modern OS kernel with QUIC support
- Sufficient bandwidth
- A TLS certificate
Client requirements
- A client with QUIC support
- Permission to send UDP traffic
- Adequate system resources
- The latest client version
Network requirements
- UDP ports open
- A low packet loss rate
- Sufficient bandwidth
- A stable connection