Standard Minecraft uses TCP connections for server communication. Browsers, however, use WebSockets. To bridge this gap, Eaglercraft uses a modified version of Bungeecord that proxies the browser's WebSocket connection to the pure TCP connection used by Minecraft. This is why Eaglercraft can join real Minecraft 1.12 servers—it's actually speaking the same protocol.