Cloud Proxy
Overview
By setting the SDK's cloud proxy interface, all traffic corresponding to the SDK is forwarded through the cloud proxy server to achieve communication with RTC and L3 (Live Streaming).
- The "Cloud Proxy" feature is a
paidfeature. If you need to use this feature, please contact ZEGO business personnel for consultation. - After activating 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 provides two modes: Standard Cloud Proxy and Smart Cloud Proxy. Developers can choose the appropriate cloud proxy mode according to your business needs.
| Standard Cloud Proxy | Smart Cloud Proxy | |
|---|---|---|
| Solution Description | When initializing the SDK, use the cloud proxy mode directly. | When initializing the SDK, prioritize using the direct connection network mode for attempts.
When the network switches, if network connectivity is detected and the current mode is direct connection mode, it will directly attempt according to the SDK initialization logic. |
| Applicable Scenarios | When you are in restrictive network environments such as hospitals, government, or company intranets, and want to use public cloud RTC or L3 services. | When your users are in scenarios with both public networks and restrictive networks, and you cannot determine the user's network usage, and want to prioritize using public cloud RTC or L3 services, and use cloud proxy services when public cloud RTC or L3 services are unavailable. |
Prerequisites
Before using cloud proxy, please ensure:
- You have created a project in the ZEGOCLOUD Console and obtained a valid AppID and AppSign. For details, please refer to Console - Project Information.
- You have integrated the ZEGO Express SDK into your project and implemented basic audio and video publishing and playing functions. For details, please refer to Quick Start - Integration and Quick Start - Implementation.
Usage Process
1 Activate cloud proxy service
Apply to ZEGOCLOUD Technical Support to activate the cloud proxy service. After activating the service, developers will obtain a cloud proxy domain name and port information.
2 Configure cloud proxy
Call setCloudProxyConfig to configure cloud proxy.
This interface must be called before calling the createEngine interface to create the engine.
- Interface prototype
/**
* Set cloud proxy.
*
* This interface needs to be called before createEngine.
* After calling this interface, all network requests and sending of Express SDK will be forwarded through the cloud proxy.
*
* @param proxyList List of cloud proxy information, supports setting multiple cloud proxy information.
* @param token Authentication token. If the customer uses appsign authentication, this can be empty. Otherwise, token must be filled in.
* @param enable Whether to enable cloud proxy.
*/
static Future<void> setCloudProxyConfig(
List<ZegoProxyInfo> proxyList, String token, bool enable)- Call example
var proxy = ZegoProxyInfo();
//Domain name and port, filled in by the developer according to the information obtained when activating the cloud proxy service
proxy.hostName = "xxxxxxxxxxx.zego.im";
proxy.port = 1080;
List<ZegoProxyInfo> list = [];
list.add(proxy);
ZegoExpressEngine.setCloudProxyConfig(list, "", true);FAQ
1. How to solve if cloud proxy setting does not take effect
- Ensure that the cloud proxy service has been activated and a valid proxy port and domain name have been obtained.
- Ensure that cloud proxy is set correctly before createEngine, and mid-way modification is not supported.
2. Is there a local proxy solution?
Yes, for details please refer to Local Proxy.
