Fetching endpoints for a location
Endpoints represent a specific configuration for a protocol running on a VPN server. They contain all required configuration parameters for the VPN connection to be setup.
Protocol Pecking Order
Endpoints returned by the SDK are consistently organized based on the Protocol Pecking Order established by the Ops team. This order specifies the preferred protocol combinations and parameters that an application should utilize to establish a connection.
For platforms that support parallel connections, the SDK will initiate connections to all instances simultaneously. The connection that succeeds with the lowest index will be designated as the "winner" and will be used for the VPN session.
get_endpoints_for_protocols
get_endpoints_for_protocolsThis method will return endpoints for the specified location, filtered by protocol. A shortcut to this method is get_endpoints() which will set the protocol filter to lightway, openvpn and wireguard .
Parameters
subscription_id
String
ID of the subscription which has a VPN entitlement. You can obtain that subscription id as described in Obtaining a VPN Subscription ID
protocols
Array of InstanceProtocol
Contains the protocols to filter for. Some locations might not support all protocols or you are only interested in some specific protocol endpoints.
lightway
openvpn
wireguard
proxy
Returns
LocationEndpoints upon success, InstanceDiscoveryException otherwise.
LocationEndpoints
location_id
String
ID of the location this instances belongs to
EndPointConfiguration
And endpoint configuration can be one of the following types
EndpointConfiguration.lightway
port
Integer
Port of the endpoint
transport
ProtocolTransport
Either udp or tcp
mtu
Integer
Maximum Transmission Unit
certDn
String
Expected Certificate's CN value for that server
obfuscation
LightwayObfuscation
Lightway Obfuscation Method to be used
EndpointConfiguration.openVpn
port
Integer
Port of the endpoint
transport
ProtocolTransport
Either udp or tcp
mtu
Integer
Maximum Transmission Unit
certDn
String
Expected Certificate's CN value for that server
ovpnConfiguration
String
OpenVPN Configuration Parameters
ovpnConfigTemplate
(Optional) String
OpenVPN Configuration Template
xorValue
Integer
XOR Value for OpenVPN Obfuscation
EndpointConfiguration.wireGuard
WireGuard will always use the udp transport type. WireGuard requires a Public/Private keypair to be generated for each new connection and the public key to be send to the endpoint's authentication IP and port to be registered. The SDK will automatically handle this, if a WireGuard Session Token for a specific endpoint is fetched.
port
Integer
Port of the endpoint
authIP
IpAddress
IP of the authentication endpoint
authPort
Integer
IP of the authentication port
certDn
String
Expected Certificate's CN value for that server
obfuscation
WireGuardObfuscation
Type of WireGuard Obfuscation to be used
EndpointConfiguration.httpProxy
This configuration represents and HTTP(s) Proxy which can be used in browser extensions. It will only return the hostname of the proxy to use.
IPAddress
This represents either an v4 or v6 IP Address.
Last updated