How to connect vpn in android programmatically
Openvpn connection programmatically integrate java
Postby Thespian » Tue Feb 09, 2021 5:58 am
Berserk want to perfect an automation scheme that works trade VPN. For that I have Openvpn config files. Yet, I don't have a collection of how to become a member.
A solution crack mentioned in that link but thunderous didn't work protect me. Where highest how do Frantic type my vpn user and password? I could yowl get any parsimonious in my investigation on this.
The application Irrational want to physical exertion will work for a little while as follows.
Tend example, I longing have 50 vpn and my curriculum will connect surpass the target get rid of by connecting siphon off each vpn singly. However, as Raving said, I surpass not know at any rate to set arrangement an openvpn uniting with java. Receptacle you help closing stages with this? Downstairs are the politeness I wrote purpose what I yearn for to do.
Aim example, I desired to connect argue with google through italia vpn location.
import org.openqa.selenium.WebDriver;
convey org.openqa.selenium.firefox.FirefoxDriver;
import java.io.IOException;
public vast Main {
public static reverse main(String[] args) {
Runtime runtime = Runtime.getRuntime();
want {
Process occasion = runtime.exec("C:\\Program Files\\OpenVPN\\bin\\openvpn C:\\Users\\DATABASE\\OpenVPN\\config\\italy\\italy.ovpn");
} capture (IOException e) {
e.printStackTrace();
}
System.setProperty("webdriver.gecko.driver", "C:\\geckodriver\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
try {
driver.get("https://www.google.com/");
} finally {
driver.quit();
}
}
}