Documentation
ExpressVideoSDK Video Call
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • Video Call
  • Upgrade using advanced features
  • Distincitve features
  • Transfer traffic via the cloud proxy server

Transfer traffic via the cloud proxy server

Last updated:2023-08-31 15:50

Overview

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.

Prerequisites

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.

Implementation steps

Activate the cloud proxy service

Contact ZEGOCLOUD Technical Support to activate the cloud proxy service, and then you will receive a cloud proxy domain name and port information.

Configure the cloud proxy

To configure the cloud proxy, call the setCloudProxyConfig method.

This method must be called before calling the createEngine method.

  • API prototype
/**
 * 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) 
  • Sample method call
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);
Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code