Cloud Proxy
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).
- The "Cloud Proxy" feature is a
paidfeature. 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 description | When initializing the SDK, directly use Cloud Proxy mode. |
| Applicable scenarios | When 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:
- You have created a project in the ZEGOCLOUD Console and applied for a valid AppID and Server address. For details, please refer to Console - Project Information.
- You have integrated ZEGO Express SDK in your project and implemented basic audio/video Stream Publishing and Playing functions. For details, please refer to Quick Start - Integration and Quick Start - Implementation.
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.
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.
