AiPBX
Product Features Integrations
Install Mobile
Resources Docs FAQ & Tech Why PHP? Videos
Try Contact Sponsor on GitHub UpCloud ($250 Free Credit) YouTube GitHub

Port 443 Nginx L4 ALPN & SNI Stream Multiplexing

Zero-decryption Nginx L4 ssl_preread multiplexer on TCP 443 carrying the web portal, WebRTC WSS, Go chat, TURNS media relay, and region-based SIP-TLS desk phones through strict corporate and hotel firewalls.

Home / FAQ & Tech / Port 443 Nginx L4 ALPN & SNI Stream Multiplexing
PRODUCTION · EDGE INGRESS

How Zero-Decryption Routing Works

Nginx TCP stream inspects only the initial TLS ClientHello with ssl_preread: HTTP/WSS clients (http/1.1, h2) stream to Apache (:8443), matching phone-region SNIs stream to Asterisk SIP-TLS (:5061), and WebRTC TURNS connections (empty ALPN or stun.turn) route through a local PROXY-stripping relay (:15349) to coturn (:5349).

Real Client IPs & Let's Encrypt ACME HTTP-01

The PROXY protocol preserves real client IPs into Apache so fail2ban jails and audit logs see attackers instead of 127.0.0.1. Meanwhile, Port 80 exempts /.well-known/acme-challenge/ from HTTPS redirects because Let's Encrypt validation bots send no ALPN and would otherwise hit coturn on Port 443.

Standard SIP desk phones and carrier SIP trunks continue using native ports 5060/5061 while remote WebRTC, chat, mobile, and firewall-restricted phones share Port 443.
WebRTC, NAT & TURN Docs Why PHP? (Architecture) All Technologies