To meet the laws and regulations of different countries or regions, the Agora RTC SDK supports geofencing. After enabling geofencing, the Agora SDK only connects to Agora servers within the specified region.
For example, if you specify North America as the region for connection, the SDK only connects to Agora servers in North America. When there is no available server in North American, the SDK throws an error instead of connecting to servers in another region.
You can call
AgoraRTC.setArea to specify the region for connection. By default, the SDK connects to nearby Agora servers. After specifying the region, the SDK connects to the Agora servers within that region. The supported regions include:
ASIA: Asia, excluding Mainland China
NORTH_AMERICA: North America
If a firewall is deployed in your network environment, ensure that you whitelist certain domains, allow all IP addresses, and open certain firewall ports according to Firewall Requirements.