On this page
Why calls need UDP
A call is a stream of small packets, each a few milliseconds of sound or a piece of a frame. A packet that comes late is as useless as a lost one, so calling apps prefer UDP, which neither waits nor resends. Discord's developer documentation describes voice as a separate UDP connection next to the WebSocket that sets it up. Telegram's documentation describes its calls as built on WebRTC, going straight to the other person's address or through Telegram's relay servers.
WebRTC is also behind calls in browsers and many other apps. Its standard assumes UDP and keeps TCP as a way through firewalls that block UDP: a relay server (TURN) reached over TCP or TLS. Such a call connects, but every lost packet holds up the ones behind it, and the voice turns choppy or falls behind.
Before a call the apps also learn their public address and port from a STUN server, to try a direct path. With a VPN on, what they learn is the VPN server's address and its NAT, not your router's.
What breaks a call in a VPN
A proxy typed into Telegram itself is a separate thing: an MTProto proxy carries messages, not calls.
Messages go, calls hang on “Connecting”
Likely causeNot everything goes into the tunnel: the client works as a proxy, or UDP isn't carried
What to doSwitch the client to its TUN or VPN mode; check UDP on the server
Sites open on Shadowsocks, calls and games don't
Likely causeThe server relays only TCP, or its UDP port is closed
What to doTurn UDP on in the server's settings and open the port for UDP, at the host too
Calls connect, the voice is choppy and late
Likely causeUDP travels inside TCP (VLESS, VMess, Trojan, OpenVPN over TCP) on a line that loses packets
What to doA profile that carries UDP as UDP, or a server closer to you
WireGuard or Hysteria2 won't connect on this network, TCP profiles do
Likely causeThe network lets no UDP out: some offices, hotels and guest Wi-Fi
What to doA TCP protocol for this network; calls will work, but worse
A call connects only after a long wait and has more delay
Likely causeThe VPN server's NAT gives a new port for every address, so the call goes through relays
What to doCompare the NAT type with the VPN on and off; try another server
Calls drop every few minutes
Likely causeThe tunnel itself reconnects
What to doLook at the client's log at the moment of the drop
How each protocol carries UDP
WireGuard, AmneziaWG
How UDP travelsWhole IP packets over UDP: a call goes as it is
What to checkThe network must let UDP out to the server's port
Hysteria2
How UDP travelsUDP packets in QUIC datagrams, over UDP
What to checkThe same; port hopping helps where one long UDP flow gets slower
TUIC
How UDP travelsAs UDP (
udp_relay_modenative) or in QUIC streams (quic, with more overhead)What to checkNative usually suits calls better
VLESS
How UDP travelsInside its TCP connection; sing-box encodes it as XUDP by default, which Xray servers understand
What to checkWorks, but suffers on lossy lines
VMess, Trojan
How UDP travelsInside the same TCP or TLS connection
What to checkAs VLESS
Shadowsocks
How UDP travelsSeparate encrypted UDP packets to the server's port
What to checkUDP on in the server's settings and open in its firewall. UDP over TCP is an option of sing-box, and the server has to know it too
OpenVPN
How UDP travelsWith
proto udpas UDP, withproto tcpinside TCPWhat to checkUDP for calls
An HTTP proxy
How UDP travelsNot at all: an ordinary HTTP proxy carries TCP connections
What to checkNot for calls
SOCKS5
How UDP travelsCan relay UDP (the UDP ASSOCIATE command), if the app and the proxy both use it
What to checkAn app sends there only what it was written to send
TUN or system proxy
Many clients can work two ways. In proxy mode they set a system proxy, and only programs that read it use the VPN, mostly browsers, over TCP. A messenger may not read it at all: its messages and calls then go past the VPN, or nowhere if the network blocks them. In TUN mode the client creates a virtual network adapter, and everything the system sends, UDP included, goes into it. The switch is usually called TUN or VPN mode. On Android, an app that asks for the system's VPN permission works this way.
A browser call is a special case. With a proxy instead of a VPN, WebRTC can go around the proxy over UDP and show the other side your real address. A WebRTC leak test shows what a page sees.
The messenger inside the tunnel or outside it
Split tunneling decides it for one app. Which way depends on where calls work.
Calls work on this network without the VPN
Do thisLeave the messenger out: “everything through the VPN except” this app
What it costsIts messages go direct too; in a direct call the other side sees your real address
The messenger doesn't open without the VPN
Do thisKeep it in, on a profile that carries UDP as UDP
What it costsThe call is as good as the server: take a close one
Only the messenger needs the VPN
Do this“Only through the VPN” with just this app
What it costsEverything else goes as without a VPN
- By app, not by address. A direct call goes to the other person's address, which is on no list of the service's networks. A rule by address catches the messages and the relays, not such a call.
- Restart the app after changing the rule, and reconnect the VPN: connections that were open keep their old way.
- One VPN at a time. Two clients fight over the routes, and calls are the first to suffer.
Check, step by step
- 1
Call without the VPN
On the same network. If it fails there too, the cause is the network or the app, not the VPN.
- 2
See what the network does with UDP
A NAT type test with the VPN off tells whether UDP gets out at all and what NAT you are behind. With the VPN on it shows the server's NAT.
- 3
Change the protocol
If the same server has a WireGuard, AmneziaWG or Hysteria2 profile next to VLESS, call on it. Better there: the trouble was UDP inside TCP.
- 4
Check your own server
For Shadowsocks the port must be open for UDP as well as TCP, in the server's firewall and in the host's panel. The commands are below.
- 5
Take the app out, or put only it in
Split tunneling as above, then restart the messenger and call again.
ss -lunp | grep 8388
ufw status | grep 83888388 is an example, put your port. An empty answer to the first line means nothing listens there on UDP. ufw allow 8388/udp opens it in ufw; the host's own firewall counts too.