Skip to content
This repository was archived by the owner on Mar 19, 2022. It is now read-only.
This repository was archived by the owner on Mar 19, 2022. It is now read-only.

KEEPALIVE_TIMEOUT log message from provider leaves the tunnel dead #141

Description

@javierdemartin

I am tunnelling my traffic through a server. In some cases it has to block determinate websites, e.g. gambling sites. The tunnel works without a problem if I start the tunnel with WiFi or Cellular. When I change the network to the opposite the VPN reconnects automatically as I am using on demand VPN but the VPN doesn't block the websites it did before. My main supposition is that after changing the interface, WiFi to Cellular or vice versa, the outgoing traffic from the device it is not routed through the tunnel interface (utun) but the VPN is still up.

How could I check or "force" the outgoing traffic through my tunnel interface?

I can detect when the interface changes and I could force restart the tunnel but I shouldn't do it. That should be the tunnel's task and I prefer not to force the tunnel's state.

This also happens after a while, between 2 to 5 minutes, the VPN restarts and in the network extension's provider openVPNAdapter(_ openVPNAdapter: OpenVPNAdapter, handleLogMessage logMessage: String) method I get the following messages

Session invalidated: KEEPALIVE_TIMEOUT
Client terminated, restarting in 2000 ms...

I don't know if this has to be related with my Swift code or with the OpenVPN server setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions