Page 1 of 1

Split Tunnelling: Miracast (Wi-Fi Direct)

Posted: Mon Oct 23, 2017 4:17 pm
by sunkai
Miracast is the de facto standard for screen sharing from mobile devices. It operates akin to "HDMI over Wi-Fi Direct".

The current behaviour of OpenVPN Connect (Android) is that local Miracast device discovery can occur whilst connected to a remote VPN, but connections between Miracast devices fail. It is also the case that existing Miracast connections will fail when a VPN connection is made.

Is there a configuration of OpenVPN Connect (Android) that will allow Miracast connections to be made, whilst directing all other traffic through the VPN (i.e. split tunnelling)?

N.B. the Miracast connection may be made using the same Wi-Fi radio as the WLAN connection that is routing WAN traffic.

P.S. the Android app for 3rd-party VPN provider, "PureVPN", purports to allow application-level split tunnelling.

Re: Split Tunnelling: Miracast (Wi-Fi Direct)

Posted: Mon Oct 23, 2017 7:26 pm
by TinCanTech
What IP addresses do you use for the Miracast link ?

Re: Split Tunnelling: Miracast (Wi-Fi Direct)

Posted: Tue Oct 31, 2017 12:53 pm
by sunkai
TinCanTech wrote:
Mon Oct 23, 2017 7:26 pm
What IP addresses do you use for the Miracast link ?
Good point. Ultimately, the Miracast receiver is a IPv4 LAN gateway, so I should be able to tell OpenVPN to ignore that subnet's traffic.

In this case, the subnet is 192.168.203.* (chosen by the Miracast receiver's hardware manufacturer).

I will try adding a static route to my OpenVPN Connect configuration of the form:

Code: Select all

route 192.168.203.0 255.255.255.0 192.168.203.1
As long as the IP address selected by the Miracast receiver does not change, then this should work.

Re: Split Tunnelling: Miracast (Wi-Fi Direct)

Posted: Tue Oct 31, 2017 1:05 pm
by sunkai
I tried adding the static route to my OVPN configuration file, but still failed to connect to the Miracast receiver whilst connected in OpenVPN.

Is the configuration form above incorrect?

Re: Split Tunnelling: Miracast (Wi-Fi Direct)

Posted: Tue Oct 31, 2017 1:35 pm
by TinCanTech
sunkai wrote:
Tue Oct 31, 2017 12:53 pm
In this case, the subnet is 192.168.203.* (chosen by the Miracast receiver's hardware manufacturer).
And what is the IP address of the phone while connected to wifi ?

Re: Split Tunnelling: Miracast (Wi-Fi Direct)

Posted: Fri Nov 03, 2017 2:00 pm
by sunkai
TinCanTech wrote:
Tue Oct 31, 2017 1:35 pm
sunkai wrote:
Tue Oct 31, 2017 12:53 pm
In this case, the subnet is 192.168.203.* (chosen by the Miracast receiver's hardware manufacturer).
And what is the IP address of the phone while connected to wifi ?
The "Network Connections" Android app reports the client device's "Last Used Local IP" as fluctuating between:

192.168.203.59
192.168.0.225

N.B. this is during normal operation, without OpenVPN Connect enabled.