Establish a VPN connection with react-native on android

Viewed 5995

How can I create a VPN connection (PPTP or anything else) with react-native in android and then connect to it?

1 Answers

You can use react-native-ip-sec-vpn now!

Use it like as follow:

import {prepare, connect} from "react-native-ip-sec-vpn";
...
useEffect(() => {
    prepare();
}); /// or use componentDidmount in case of a class component
...
connect(address, username, password)
Related