Establish a VPN connection with react-native on android

后端 未结 1 901
心在旅途
心在旅途 2021-02-18 21:32

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

相关标签:
1条回答
  • 2021-02-18 22:08

    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)
    
    0 讨论(0)
提交回复
热议问题