OpenVPN / openvpn3

OpenVPN 3 is a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch.
https://openvpn.net
Other
999 stars 401 forks source link

How to use openvpn3 in java #319

Open HunterWbk opened 4 months ago

HunterWbk commented 4 months ago

I am a beginner in C++. I have been exposed to Java for a while, and now I want to try app development, such as implementing the Android client of openvpn. As you know, Android can be developed with Java, but the openvpn3 class library does not Support java. Then I looked up a lot of documentation,Also based on your tips, I used swig (it was my first time to come into contact with this tool) and executed ovpncli.i in the client directory, and then generated ovpncli_wrap.cxx, ovpncli_wrap.h and some java files. I don’t know how. Go ahead and use it. What I searched on the Internet is to encapsulate these into dlls. I am using Visual Studio 2022. When I put the generated cxx and h questions in, a bunch of errors were reported, such as: namespace "openvpn" has no member "DnsOptions", "openvpn::TunBuilderBase" has no member "tun_builder_add_dns_options", member functions declared using "override" cannot override base class members...etc., this is for beginners It's very painful and I need your help.