# Location profile (Hydra only)

The SDK supports custom VPN profiles for Hydra-based sessions. This feature allows you to pass specific configuration profiles to control the VPN connection behavior.

* **How to Enable**: Use the `withLocationProfile` method in `SessionConfig.Builder` to apply the desired location profile to the VPN session.
* **Fetching Profiles**: The `LocationProfile` can be fetched dynamically from the backend using the available API.

```kotlin
sdk.getBackend().locations(ConnectionType.HYDRA_TCP, new Callback<AvailableLocations>() {
   @Override
   public void success(@NonNull AvailableLocations availableLocations) {
        //availableLocations.getProfiles()
   }

   @Override
   public void failure(@NonNull VpnException e) {
   }
}); 
```

* **Disabling Location Profile**: To disable a location profile, pass an empty string (`""`) to the `withLocationProfile` method.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pango.gitbook.io/paas/sdk/vpn-sdk-for-android/features/hydra-protocol/location-profile-hydra-only.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
