To use a local proxy (for example, to point Telegram on a Mac at VilaVPN):
Telegram Settings — Proxy — Add Proxy
Type: SOCKS5
Server: 127.0.0.1
Port: 10081
This is a single local port that handles both SOCKS5 and HTTP. In the VilaNet app you can see and change it under Settings → Local Proxy (it is only active in desktop Proxy mode or when Network Sharing is on). Also disable any firewall, antivirus or other proxy, and connect VilaVPN in global mode.
*Some versions of Telegram have a proxy bug — see https://github.com/overtake/TelegramSwift/issues/370