Cloud Proxy
Function Overview
By setting the SDK's cloud proxy interface, all traffic corresponding to the SDK is forwarded through the cloud proxy server to communicate with RTC and L3.
- 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 cloud proxy IP to the enterprise firewall whitelist.
- This feature does not support running in WebGL environment.

Currently, ZEGO provides two modes: Normal Cloud Proxy and Smart Cloud Proxy. Developers can choose the appropriate cloud proxy mode according to your business needs.
| Normal Cloud Proxy | Smart Cloud Proxy | |
|---|---|---|
| Solution Description | When initializing the SDK, use cloud proxy mode directly. | When initializing the SDK, prioritize trying direct connection network mode.
When network switches, if network connectivity is detected and currently in direct connection mode, it will directly attempt according to the SDK initialization logic. |
| Applicable Scenarios | When you are in restricted network environments such as hospitals, government, company internals, etc., and want to use public cloud RTC or L3 services. | When your users are in scenarios with both public network and restricted networks, and you cannot determine the user's network usage situation, and want to prioritize using public cloud RTC or L3 services, and use cloud proxy service when public cloud RTC or L3 services are unavailable. |
Prerequisites
Before using cloud proxy, please ensure:
- You have created a project in ZEGOCLOUD Console and applied for valid AppID and AppSign. For details, please refer to Console - Project Information.
- You have integrated ZEGO Express SDK in the project and implemented basic audio and video streaming functions. For details, please refer to Quick Start - Integration and Quick Start - Implementation.
Usage Flow
1 Enable Cloud Proxy Service
Apply to ZEGOCLOUD Technical Support to enable the cloud proxy service. After enabling the service, developers will obtain a cloud proxy domain 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 cloud proxy.
*
* @param proxyList Cloud proxy information list, supports setting multiple cloud proxy information.
* @param token Authentication token. If the customer uses appsign authentication method, this can be empty. Otherwise, token must be filled in.
* @param enable Whether to enable cloud proxy.
*/
public static void SetCloudProxyConfig(List<ZegoProxyInfo> proxyList, string token, bool enable);- Call example
ZegoProxyInfo proxy = new ZegoProxyInfo();
//Domain and port, filled in by the developer according to what was obtained when enabling the cloud proxy service
proxy.hostName = "xxxxxxxxxxx.zego.im";
proxy.port = 1080;
List<ZegoProxyInfo> list = new List<ZegoProxyInfo>();
list.Add(proxy);
ZegoExpressEngine.SetCloudProxyConfig(list, "", true);FAQ
- How to solve if cloud proxy setting does not take effect
- Ensure that the cloud proxy service has been enabled and valid proxy port and domain have been obtained.
- Ensure that cloud proxy is correctly set before CreateEngine, and modification during the process is not supported.
- Is a local proxy solution provided?
Yes, for details please refer to Local Proxy.
