Multihop

Multihop routing is a VPN configuration where the connection is routed through an intermediate server before reaching the main VPN server. Even if an attacker compromises one of the servers, they would still not have complete information about the source and destination of the traffic.

  • Multihop routing is only available for the Hydra protocol. For other protocols, this setting will be ignored.

  • proxy: nil This means no proxy will be used. The connection will go directly to the main VPN server.

  • Note: Multihop is not supported on tvOS devices.

Implementing Multihop

Here's a code snippet demonstrating how to set it up:

let proxyLocation = VirtualLocation(type: .location, name: "US")

hydraSDK.start(location: .optimal(), proxy: proxyLocation, completion: { error, credential in
    if let error = error {
        print("Failed \(error)")
    } else {
        print("Success")
    }
})

The key steps are:

  1. Configure the HydraSDK with your carrier ID, extension bundle ID, group data, and Fireshield config.

  2. Create a VirtualLocation object representing the proxy server location. In this example, it's set to a location in the US.

  3. Call hydraSDK.start(), passing in the optimal server location and the proxy location.

  4. Handle the completion to check for errors and confirm successful connection.

Multihop vs Virtual Location Routing

Multihop routing provides an extra hop compared to standard virtual location routing:

  • In virtual location routing, your traffic goes directly from your device to the VPN server in the chosen virtual location.

  • With multihop routing, your traffic first goes to an intermediate proxy server, then to the main VPN server in the optimal location.

The extra hop enhances security by making traffic harder to trace, but may slightly increase latency. Virtual location routing is simpler and can be faster, but provides one less layer of protection.

Last updated

Was this helpful?