I just did setup the VPN client Pro using a softether connection to my home-system. Works.
Now, I have the fantasy I could have a VPN which connects on demand only if an app requests a hostname from a predefined domain name, or as an alternative an IP Adress from a list of subnets.
But only if I am not connected already to one of these networks (internal wifi or lan)
I this doable, or maybe partially? Using a DNS name is not that easy, because the VPN client then needs to intercept the DNS resolver of the system, but I could add host entries for the hostnames in question, or since my internal domain is also registered externally I could publish A records of hosts in the official DNS with my internal IP Addresses.
VPN client pro has a lot of options for autoconnect but it seems the feature I hoped are not currently available - correct?
Furthermore, I noticed, the VPN connection is goes down if I close the UI of the program. I hoped there is a background service which is responsible for the VPN and the UI is only used for managment purposes. Is there something I could do to fix this?
Thank you.
VPN autoconnect: connect on dns-domain request or ip subnet. is this feasible?
-
- Posts: 3
- Joined: Mon Apr 21, 2025 7:51 am
Re: VPN autoconnect: connect on dns-domain request or ip subnet. is this feasible?
For this type of configuration you need to use the Connect on demand feature.I just did setup the VPN client Pro using a softether connection to my home-system. Works.
Now, I have the fantasy I could have a VPN which connects on demand only if an app requests a hostname from a predefined domain name, or as an alternative an IP Adress from a list of subnets.
But only if I am not connected already to one of these networks (internal wifi or lan)
I this doable, or maybe partially? Using a DNS name is not that easy, because the VPN client then needs to intercept the DNS resolver of the system, but I could add host entries for the hostnames in question, or since my internal domain is also registered externally I could publish A records of hosts in the official DNS with my internal IP Addresses.
VPN client pro has a lot of options for autoconnect but it seems the feature I hoped are not currently available - correct?
Furthermore, I noticed, the VPN connection is goes down if I close the UI of the program. I hoped there is a background service which is responsible for the VPN and the UI is only used for managment purposes. Is there something I could do to fix this?
Here are the steps:
- start the app
- tap on top left icon
- tap on "Connect on demand" button
- set "On demand mode" to "Connect when the device send a packet to the selected routes"
- select "Disconnect when the WiFi is connected to these SSID" and add the desired SSID
- tap on "+" button
- tap on vpn profile
- select "Connect on demand"
- tap on "+" button
- set "Type" to "Hostname" and set the "Destination"
- tap on "Ok" button
- save the changes
Unfortunately this issue is due to the Android ROM you are using. On stock Android ROMs the service is not stopped.Furthermore, I noticed, the VPN connection is goes down if I close the UI of the program. I hoped there is a background service which is responsible for the VPN and the UI is only used for managment purposes. Is there something I could do to fix this?
You should look for a specific solution for the device you are using or the custom ROM you have installed.
-
- Posts: 3
- Joined: Mon Apr 21, 2025 7:51 am
Re: VPN autoconnect: connect on dns-domain request or ip subnet. is this feasible?
Great. Works!
Thank you for the detailed receipe. I did not see this, only tried to setup this inside the settings of the VPN profile.
The other problem is (I think) related to android 13+ in general. My device is rooted, but otherwise a nearly unchanged Android. Also other people report similar with different VPN clients. Is happens when you close all apps. The app is closed, the VPN connection is terminated. The app launches again, but the monitor for the dial on demand is not running afterwards. Also I saw another post here in the forum about it.
I will check this with a different phone model.
Thank you for the detailed receipe. I did not see this, only tried to setup this inside the settings of the VPN profile.
The other problem is (I think) related to android 13+ in general. My device is rooted, but otherwise a nearly unchanged Android. Also other people report similar with different VPN clients. Is happens when you close all apps. The app is closed, the VPN connection is terminated. The app launches again, but the monitor for the dial on demand is not running afterwards. Also I saw another post here in the forum about it.
I will check this with a different phone model.