To allow users to use the Agora RTC Native SDK in environments with restricted network access, Agora provides a cloud proxy service.
This page describes the use of the Agora Cloud Proxy with the Agora RTC Native SDK v3.4.0 or later.
This section provides a high-level overview of the Agora Cloud Proxy solution and supported cloud proxy modes.
The following network diagram shows the basic working principles of the Agora Cloud Proxy.
To ensure connectivity in restricted network environments, the Agora Cloud Proxy service supports the following modes:
Mode | Description | Applicable scenario | Pricing plan | How to enable |
---|---|---|---|---|
Automatic | The SDK attempts a direct connection to Agora SD-RTN™, and automatically falls back to TCP/TLS 443 if the attempt fails.① | Used when users might be behind a firewall. | No additional charges. | The SDK has this mode enabled by default. |
Force UDP | The SDK transmits data over UDP. This mode ensures a higher-quality video and audio experience. | Used when users are behind a firewall and require high-quality media. | You need to pay for this mode. | You must configure the firewall to allow specific IP addresses and ports provided by Agora. Follow the procedures in Prerequisites and Implementation to enable this cloud proxy mode. |
Force TCP | The SDK transmits data over TCP/TLS 443. | Used when users are behind a firewall and the security policy allows data to flow through TCP/TLS 443 only. | You need to pay for this mode. | You must configure the firewall to allow specific IP addresses and ports provided by Agora. Follow the procedures in Prerequisites and Implementation to enable this cloud proxy mode. |
① Automatic fallback typically occurs within 2 seconds.
Before proceeding, complete the following steps:
To use the Agora Cloud Proxy service for the Force UDP or Force TCP modes, you must configure your firewall to trust specific allowed IP addresses and ports. The tables below provide the Allowed IP list for the Force UDP and Force TCP modes.
To ensure high availability of the Agora Cloud Proxy service, Agora recommends configuring your firewall to trust all the IP addresses and ports specified in the tables below. If you want to restrict the use of the Agora Cloud Proxy in a certain geographic region, ensure that you use SDK version v3.4.8, v3.4.11, v3.5.0.3, or any version later than v3.5.0.3, and enable the network geofencing function.
Mainland China
IP address | Protocol | Port | Used to |
---|---|---|---|
UDP | 8443 | Access the signaling service | |
UDP | Access the media service |
Asia, excluding Mainland China
IP address | Protocol | Port | Used to |
---|---|---|---|
UDP | 8443 | Access the signaling service | |
UDP | Access the media service |
Japan
IP address | Protocol | Port | Used to |
---|---|---|---|
UDP | 8443 | Access the signaling service | |
UDP | Access the media service |
India
IP address | Protocol | Port | Used to |
---|---|---|---|
UDP | 8443 | Access the signaling service | |
UDP | Access the media service |
Europe
IP address | Protocol | Port | Used to |
---|---|---|---|
UDP | 8443 | Access the signaling service | |
UDP | Access the media service |
North America
IP address | Protocol | Port | Used to |
---|---|---|---|
UDP | 8443 | Access the signaling service | |
UDP | Access the media service |
Mainland China
IP address | Protocol | Port | Used to |
---|---|---|---|
TCP | 443 | Access the signaling service | |
TCP | 443 | Access the media service |
Asia, excluding Mainland China
IP address | Protocol | Port | Used to |
---|---|---|---|
TCP | 443 | Access the signaling service | |
TCP | 443 | Access the media service |
Japan
IP address | Protocol | Port | Used to |
---|---|---|---|
TCP | 443 | Access the signaling service | |
TCP | 443 | Access the media service |
India
IP address | Protocol | Port | Used to |
---|---|---|---|
TCP | 443 | Access the signaling service | |
TCP | 443 | Access the media service |
Europe
IP address | Protocol | Port | Used to |
---|---|---|---|
TCP | 443 | Access the signaling service | |
TCP | 443 | Access the media service |
North America
IP address | Protocol | Port | Used to |
---|---|---|---|
TCP | 443 | Access the signaling service | |
TCP | 443 | Access the media service |
After adding the allowed IP list, do the following to enable UDP or TCP cloud proxy:
After configuring your firewall to trust the Allowed IP list, do the following to enable the Force UDP or Force TCP cloud proxy mode:
setCloudProxy
, and set proxyType
as UDP_PROXY(1)
or TCP_PROXY(2)
.To disable the Force UDP or Force TCP cloud proxy mode, call setCloudProxy
and set proxyType
as NONE_PROXY(0)
, which enables the SDK to return the Automatic (default) mode.
setCloudProxy
before using the Agora Cloud Proxy Force UDP or Force TCP mode. For example, if you need to enable cloud proxy to join a channel, call setCloudProxy
before joinChannel
. If you need to enable cloud proxy to conduct a lastmile test, call setCloudProxy
before startLastmileProbeTest
. The settings of setCloudProxy
takes effect within the life cycle of RtcEngine
.