Multihop
Multihop routing is a VPN configuration where the connection is routed through an intermediate server before reaching the main VPN server.
Multihop routing is only available for the Hydra protocol.
Implementing Multihop
To enable multihop routing, you need to pass an additional location to the withLocation
method of the SessionConfig.Builder
class. Both the main location and the proxy location can be fetched using the Backend API.
Here's an example of how to create a SessionConfig
with multihop routing:
In this example, "US" is the main location, and "YOUR_ACTUAL_PROXY_LOCATION" is the proxy location.
Fetching Available Virtual Locations
To fetch the available locations for multihop routing, you can use the locations
method of the Backend
class, specifying the ConnectionType.HYDRA_TCP
parameter.
Here's an example of how to fetch the available locations:
Optimal Proxy
To automatically select the optimal proxy location based on network conditions and server load, you can pass an empty string (""
) as the proxy parameter in the withLocation
method. Passing null
as the proxy parameter means that no proxy location is used.
Last updated