Fetching a list of available locations
Locations represent a cluster of servers at a specific geographical location. The SDK will use proper caching so that this list is frequently updated.
get_locations_for_protocols
get_locations_for_protocolsThis will return all available locations for the provided subscription id and protocols. A shortcut to this method is get_locations() which will set the protocols to lightway, openvpn and wireguard.
Parameters
subscription_id
ID of the subscription which has a VPN entitlement. You can obtain that subscription id as described in Obtaining a VPN Subscription ID
protocols
An array of protocol identifiers.
lightway
openvpn
wireguard
proxy
Returns
Array of ServerLocation objects if successful, InstanceDiscoveryException otherwise.
ServerLocation
id
String
Unique ID of that location
name
String
Display Name of that location
latitude
Float
Geographical Latitude of that location
longitude
Float
Geographical Longitude of that location
instance_count_min
Integer
Minimum number of instances in that location
instance_count_max
Integer
Maximum number of instances in that location
is_geolocated
Boolean
If true, this instance is physically not located in that location, but emulates the location by using a specific set of IPs, which are associated with that location
popularity_order
Integer (optional)
If set, it defines the popularity of that location, which can be used to show popular locations in the UI of the app
test_ips
Array of String
A set of IPs, which this instance provided to run speedtests
Last updated