# Cloud proxy (/en/realtime-media/rtc-server-sdk/build/secure-and-optimize-connections/cloud-proxy)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Agora Cloud Proxy is a feature of Agora Voice and Video SDKs. It ensures reliable audio and video connectivity for end users when they connect from restricted network environments.

The following figure illustrates how Agora Cloud Proxy works:

![](https://assets-docs.agora.io/images/video-sdk/cloud-proxy-tech.svg)

1. The 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 SDRTN®.
4. Agora SDRTN® returns data to Cloud proxy. Cloud proxy receives the data and sends it to the SDK.

## Prerequisites [#prerequisites]

Before enabling Cloud proxy, make sure that you have:

1. [Integrated the SDK](../../index.mdx) and prepared the development environment.
2. Contacted [Agora support](mailto\:support@agora.io) and provided the following information to request Cloud proxy:
   * App ID
   * Cloud proxy service usage area
   * Concurrency scale
   * Network operator and other relevant information

<a name="implementation"></a>

## Implementation [#implementation]

To enable Force UDP or Force TCP Cloud proxy mode, take the following steps:

1. After receiving the request, Agora provides the IP addresses and ports used for Cloud proxy. Add the IP addresses and ports provided by Agora to your firewall whitelist.

2. To enable Cloud proxy through private parameters before connecting to a channel, call `agora::base::IAgoraParameters::setParameters`:

   ```cpp
   // Enable cloud proxy
   setParameters("{\"rtc.enable_proxy\": true}");
   // The cloud proxy for the TCP protocol, that is, the Force TCP cloud proxy mode. In this mode, the SDK always transmits data over TLS 443.
   setParameters("{\"rtc.proxy_server\":[13,\"\",0]}");
   // The cloud proxy for the UDP protocol, that is, the Force UDP cloud proxy mode. In this mode, the SDK always transmits data over UDP.
   setParameters("{\"rtc.proxy_server\":[1,\"\",0]}");
   ```

3. Test the audio and video call functionality.

### Considerations [#considerations]

* Agora recommends that you enable Cloud proxy before connecting to the channel or after disconnecting from the channel.
* Force UDP Cloud proxy mode does not support pushing streams to the CDN or relaying streams across channels.
