24

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

Amir J
  • 517
  • 4
  • 9

1 Answers1

1

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)