Geofencing
To meet the laws and regulations of different countries or regions, the Agora Signaling SDK supports geofencing. You can limit the data transmission of the Signaling SDK to a specific region. After enabling geofencing, the Signaling SDK only connects to Agora Signaling within the specified region.
Implementation
You need to call AgoraRTM.setArea method to specify the region for connection. After specifying the region, the SDK connects to the Agora servers within that region. The following regions are supported:
-
GLOBAL: (Default) Global. -
CHINA: Mainland China. -
ASIA: Asia excluding mainland China. -
EUROPE: Europe. -
INDIA: India. -
JAPAN: Japan. -
NORTH_AMERICA: North America.
If you specify the region for connection as GLOBAL, you can use the excludeArea parameter in the AgoraRTM.setArea method to remove individual region from the regions for connection possibilities.
Sample code
Considerations
Firewall requirements
If a firewall is deployed in your network environment, ensure that you add the domains in the following table according to the region you specify, allow all IP addresses, and open the following firewall ports.
-
Whitelist domains
Region Domain Mainland China
webrtc2-ap-web-2.agoraio.cnwebrtc2-ap-web-4.agoraio.cnstatscollector-3.agoraio.cnstatscollector-4.agoraio.cnlogservice-china.agora.ioNorth America
ap-web-1-north-america.agora.ioap-web-2-north-america.agora.iostatscollector-1-north-america.agora.iostatscollector-2-north-america.agora.iologservice-north-america.agora.ioEurope
ap-web-1-europe.agora.ioap-web-2-europe.agora.iostatscollector-1-europe.agora.iostatscollector-2-europe.agora.iologservice-europe.agora.ioJapan
ap-web-1-japan.agora.ioap-web-2-japan.agora.iostatscollector-1-japan.agora.iostatscollector-2-japan.agora.iologservice-japan.agora.ioIndia
ap-web-1-india.agora.ioap-web-2-india.agora.iostatscollector-1-india.agora.iostatscollector-2-india.agora.iologservice-india.agora.ioAsia excluding mainland China
ap-web-1-asia.agora.ioap-web-2-asia.agora.iostatscollector-1-asia.agora.iostatscollector-2-asia.agora.iologservice-asia.agora.io -
Port - See the Firewall Requirements