WebSocket Proxy ================= .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is WebSocket Proxy?** A **WebSocket Proxy** is an intermediary server that handles WebSocket connections, forwarding messages between clients and backend WebSocket servers while managing connection upgrades from HTTP to WebSocket protocol. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is WebSocket Proxy useful?** WebSocket Proxies are useful for: - **Load balancing** WebSocket traffic - **SSL/TLS termination** for secure WebSocket (wss://) connections - **Security and access control** - **Protocol translation or filtering** - **Handling connection upgrades from HTTP to WebSocket** .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** - The proxy receives an HTTP request from a client asking to upgrade to WebSocket. - It completes the WebSocket handshake and upgrades the connection. - Then it forwards WebSocket frames bidirectionally between the client and backend server. - Supports long-lived full-duplex communication. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is WebSocket Proxy used?** WebSocket Proxies are used in: - Real-time web applications (chat apps, live notifications) - Online gaming platforms - Collaborative tools (document editing, whiteboards) - Financial trading platforms - IoT dashboards and control systems .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** WebSocket Proxy operates mainly at the **Application Layer (Layer 7)** of the OSI model. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is WebSocket Proxy Windows specific?** No, WebSocket Proxies are **not Windows specific**. They run on multiple operating systems. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is WebSocket Proxy Linux specific?** No, WebSocket Proxies are **not Linux specific**. They are commonly deployed on Linux but also available on other platforms. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by WebSocket Proxy?** WebSocket Proxy uses: - **TCP** as the underlying transport protocol (via HTTP/HTTPS) .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by WebSocket Proxy?** - **Port 80** for unsecured WebSocket (ws://) - **Port 443** for secure WebSocket (wss://) .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is WebSocket Proxy using Client server model?** Yes, it follows the **client-server model**: - Acts as a **server** to the WebSocket client - Acts as a **client** to the backend WebSocket server .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`WebSocket_Proxy Version&IEEE Details ` * :ref:`WebSocket_Proxy Basic Setup on Ubuntu using IPv4 ` * :ref:`WebSocket_Proxy Basic Setup on Ubuntu using IPv6 ` * :ref:`WebSocket_Proxy Protocol Packet Details ` * :ref:`WebSocket_Proxy Usecases ` * :ref:`WebSocket_Proxy Basic Features ` * :ref:`Reference links ` .. _WebSocket_Proxy_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _WebSocket_Proxy_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _WebSocket_Proxy_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _WebSocket_Proxy_step5: .. tab-set:: .. tab-item:: WebSocket_Proxy Version&RFC Details * rfc details .. _WebSocket_Proxy_step18: .. tab-set:: .. tab-item:: WebSocket_Proxy Basic Setup on Ubuntu using IPv4 * setup .. _WebSocket_Proxy_step19: .. tab-set:: .. tab-item:: WebSocket_Proxy Basic Setup on Ubuntu using IPv6 * setup .. _WebSocket_Proxy_step6: .. tab-set:: .. tab-item:: WebSocket_Proxy Protocol Packet Details * packet details .. _WebSocket_Proxy_step7: .. tab-set:: .. tab-item:: WebSocket_Proxy Usecases * usecases .. _WebSocket_Proxy_step8: .. tab-set:: .. tab-item:: WebSocket_Proxy Basic Features * features .. _WebSocket_Proxy_step17: .. tab-set:: .. tab-item:: Reference links * Reference links