With the cloud proxy feature, you can transfer all the traffic from SDK through the cloud proxy server for RTC communication by setting the SDK's cloud proxy API method.
This feature is suitable for you to use public RTC services when you are in an intranet-limited network environment, such as hospitals, governmental institutions, enterprises, etc.
"Cloud Proxy" is a paid
feature. If you need to use this feature, please contact ZEGO sales staff for consultation.
Before you begin, make sure you complete the following:
Create a project in ZEGOCLOUD Admin Console and get the AppID and AppSign of your project.
Refer to the Quick Start doc to complete the SDK integration and basic function implementation.
Contact ZEGOCLOUD Technical Support to activate the cloud proxy service, and then you will receive a cloud proxy domain name and port information.
To configure the cloud proxy, call the setCloudProxyConfig method.
This method must be called before calling the createEngine method.
/**
* Configure the cloud proxy.
*
* This must be called before calling the createEngine method.
* After calling this method, all network requests and sending of the Video Call SDK will be forwarded through the cloud proxy.
*
* @param proxyList : cloud proxy list, supports setting several cloud proxies.
* @param token : the token used for authentication. If you use the appSign mode for authentication, leave it blank. Otherwise, the token is required.
* @param enable : whether to enable the cloud proxy.
*/
public static void setCloudProxyConfig(ArrayList<ZegoProxyInfo> proxyList, String token,
boolean enable)
ZegoProxyInfo proxy = new ZegoProxyInfo();
// The domain name and port you get when activating the cloud proxy service.
proxy.hostName = "xxxxxxxxxxx.zego.im";
proxy.port = 1080;
ArrayList<ZegoProxyInfo> list = new ArrayList<~>();
list.add(proxy);
ZegoExpressEngine.setCloudProxyConfig(list, "", true);