Skip to main content
Android
iOS
macOS
Web
Windows
Electron
Flutter
React Native
React JS
Unity
Unreal Engine
Unreal (Blueprint)

Connect through restricted networks with Cloud Proxy

Large enterprises, hospitals, universities, banks, and other institutions commonly deploy firewalls to meet their stringent security requirements. To ensure uninterrupted access to its services for enterprise users behind firewalls, Agora offers firewall whitelist and Cloud Proxy services.

Admins enable users to use Video SDK in network-restricted environments by adding specific IP addresses and ports to the firewall whitelist. Users make API calls to configure the Cloud Proxy service.

Understand the tech

Cloud Proxy works as follows:

  1. Video SDK initiates a request to Cloud Proxy.
  2. Cloud Proxy returns the corresponding proxy information.
  3. Agora SDK sends data to Cloud Proxy. Cloud Proxy receives the data and transmits it to Agora SD-RTN™.
  4. Agora SD-RTN™ returns data to Cloud Proxy. Cloud Proxy receives the data and sends it to the SDK.

Prerequisites

Ensure that you have implemented the SDK quickstart in your project.

Implement Cloud Proxy

Since Web SDK v4.3.0, Agora has optimized the Cloud Proxy architecture, enhanced the connectivity of the SDK in environments with restricted network access, and supports restricted access areas. Agora recommends that you upgrade to v4.3.0 or above.

Depending on the Web SDK version you are using, refer to the corresponding implementation method:

  1. Contact Agora support and provide the following information to request Cloud Proxy service:

    • App ID
    • Cloud Proxy service usage area
    • Concurrency scale
    • Network operator and other relevant information
  2. After successful activation, call the startProxyServer method and set the mode parameter before joining the channel:

    • Force UDP cloud proxy mode: Set mode to 3. Cloud proxy using UDP protocol. In this mode, the SDK always transmits data using UDP protocol.

    • Force TCP cloud proxy mode: Set mode to 5. (Supported since v4.9.0) Cloud proxy using TCP (encryption) protocol. In this mode, the SDK always transmits data over TLS 443.

  3. Test if you can initiate audio and video calls or live broadcasts normally.

  4. Video SDK provides a client.on("is-using-cloud-proxy") event that triggers the callback after the media stream is successfully published locally, to inform whether the current media stream is forwarded by the cloud proxy service.

    const client = AgoraRTC.createClient({mode: 'live',codec: 'vp8'});
    // Enable cloud proxy
    client.startProxyServer(3);
    // Join channel
    client.join("<YOUR TOKEN>", "<YOUR CHANNEL>").then(() => {
    /** ... **/
    });
    Copy
  5. To stop using the proxy server, call stopProxyServer after leaving the channel.

    // Leave channel
    client.leave();

    // Turn off the cloud proxy service
    client.stopProxyServer();

    // Rejoin channel
    client.join("<YOUR TOKEN>", "<YOUR CHANNEL>").then(() => {
    /** ... **/
    });
    Copy

Reference

This section contains content that completes the information on this page, or points you to documentation that explains other aspects to this product.

Firewall whitelist

  • v4.4.0 or above

    .agora.io
    .edge.agora.io
    .sd-rtn.com
    .edge.sd-rtn.com
    Copy
  • v4.0.0 - v4.4.0

    .agora.io
    .edge.agora.io
    .agoraio.cn
    .edge.agoraio.cn
    Copy
Target PortProtocolOperate
80; 443; 3433; 4700 - 5000; 5668; 5669; 6080; 6443; 8667; 9667; 30011 - 30013 (for bypass push flow)TCPallow
3478; 4700 - 5000 (version 2.9.0 and later); 10000 - 65535 (version before 2.9.0)UDPallow

API reference

Interactive Live Streaming