logo
Live Streaming
On this page

Cloud Proxy

2024-01-30

Overview

By setting the SDK's Cloud Proxy interface, all traffic corresponding to the SDK is forwarded through cloud proxy servers, enabling communication with RTC and L3 (Ultra-low latency live streaming).

Warning
  • The "Cloud Proxy" feature is a paid feature. If you need to use this feature, please contact ZEGO business personnel for consultation.
  • After enabling the Cloud Proxy service, if the enterprise has configured a firewall, you also need to add the IP, domain name, and port used by the Cloud Proxy to the enterprise firewall whitelist.

Currently, ZEGO Express Web SDK supports standard Cloud Proxy mode.

Standard Cloud Proxy
Solution descriptionWhen initializing the SDK, directly use Cloud Proxy mode.
Applicable scenariosWhen you are in a restricted network environment such as hospitals, government, or company internal networks, and want to use public cloud RTC or L3 services.

Prerequisites

Before using Cloud Proxy, please ensure:

Usage Flow

1 Enable Cloud Proxy Service

Apply to ZEGO technical support to enable the Cloud Proxy service. After enabling the service, developers will receive a Cloud Proxy domain and port information.

2 Configure Cloud Proxy

Call setCloudProxyConfig to configure Cloud Proxy.

Warning

This interface must be called as a class static method before creating the ZegoExpressEngine engine instance.

  • Interface prototype
/**
 * Set Cloud Proxy.
 *
 * This interface must be called before initializing the ZegoExpressEngine instance.
 * After calling this interface, all network requests and sending from the Express SDK will be forwarded through the Cloud Proxy.
 *
 * @param proxyList Cloud Proxy information list, supports setting multiple Cloud Proxy information.
 * @param token Authentication token.
 * @param enable Whether to enable Cloud Proxy.
 */
 static setCloudProxyConfig(proxyList: ZegoProxyInfo[], token: string, enable: boolean): void;
  • Call example
//Domain and port, developers fill in based on what they obtained when enabling the Cloud Proxy service
const proxyList = [
    {
        hostName: "xxx.xxx1.com",
        port: 443
    },
    {
        hostName: "xxx.xxx2.com",
        port: 443
    }
];
ZegoExpressEngine.setCloudProxyConfig(proxyList, "token", true);

FAQ

  • Ensure that the Cloud Proxy service has been enabled and valid proxy ports and domain names have been obtained.
  • Ensure that Cloud Proxy is correctly set before creating the ZegoExpressEngine engine instance. Modification during the process is not supported.

Yes, for details please contact ZEGOCLOUD Technical Support.

Previous

Supplemental Enhancement Information (SEI)

Next

Audio and Video Track Replacement

On this page

Back to top