# Troubleshooting

## SDK related issues

### How can I configure the VPN SDK to exclude specific domains from using the VPN connection?

The VPN SDK allows you to route network traffic through a VPN connection. By default, all internet traffic will use the VPN when the VPN is active. However, the SDK provides the ability to exclude specific domains from using the VPN connection.

In the example app, the domain ip.me is hardcoded to bypass the VPN and use the device's actual IP address. This is done to demonstrate how to configure the SDK to exclude certain domains from the VPN tunnel. The exclusion logic is implemented in the app's code, not the SDK itself. SDK users have the flexibility to specify any domains they wish to exclude from the VPN.

If you want ip.me to also use the VPN connection, simply comment out the line in the app code that excludes this domain. After relaunching the app, ip.me will then route its traffic through the VPN like all other domains.

```java
protected void connectToVpn() {
...
    public void success(@NonNull Boolean aBoolean) {
    ...
        final ArrayList<String> domains = new ArrayList<>();
        // domains.add("example.com"); // Commented out the addition of "example.com" domain
        domains.add("ip.me"); // Added a new domain "example.com" instead
        UnifiedSdk.getInstance().getVpn().start(new SessionConfig.Builder()
            .withReason(TrackingConstants.GprReasons.M_UI)
    ...
...
```

### When connected to a VPN, the IP address you see in the app (current\_server) is different from the IP address in the browser when checking public IP.

This is due to the multi-layered infrastructure of the VPN. Here is a simplified overview of how the IP addresses work in a typical VPN setup:

(client) -> -> (VPN server) -> -> (website)

* The client (your device) connects to the VPN server using the server's connect IP address. This is the current\_server IP that is visible to you.
* The VPN server then sends your web requests out to the internet using a different IP address, known as the out IP.
* When the requested website receives the web request, it sees the out IP of the VPN server, not the original IP of your client device.

In summary, the client sees the connect IP of the VPN server it is connected to, while the end website sees the out IP that the VPN server uses to relay the web requests. These two IP addresses are intentionally different in the VPN infrastructure.


---

# Agent Instructions: 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/troubleshooting.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.
