How can I create a VPN connection (PPTP or anything else) with react-native in android and then connect to it?
Asked
Active
Viewed 6,573 times
24
-
I was here(Until someone wrote a lib) – E J Chathuranga Apr 20 '20 at 07:17
-
@EJChathuranga what was the library? can you share it here? – Syed Anas Shah Aug 30 '20 at 18:38
1 Answers
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)

William Brochensque junior
- 2,385
- 18
- 35
- 46