OpenVPN / OpenVPN/openvpn3

OpenVPNClient::connect_run() SEHException on vcpkg build with c# swig pInvoke

Open
#147 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.2k
Forks
467
PR merge metrics
No merged PRs in 30d

Description

> git clone https://github.com/OpenVPN/openvpn3.git
> cmake -DCMAKE_TOOLCHAIN_FILE=<path_to_vcpkg>\scripts\buildsystems\vcpkg.cmake -A x64 -B build openvpn3
> cmake --build build --config Release --target ovpncli

By following these steps, I created the ovpncli project. clip.exe worked successfully.

Then I converted the ovpncli project from .exe to .dll.

javacli/ovpncli.i.
I added this file to the ovpncli file.

Then i created a .net console project by following the steps in this article.

Then i ran these codes..

ClientAPI_OpenVPNClient client = new ClientAPI_OpenVPNClient();

ClientAPI_Config config = new ClientAPI_Config();
config.content = text;
config.compressionMode = "yes";
ClientAPI_EvalConfig ec = client.eval_config(config);
if (ec.error)
      throw new Exception("OpenVPN config file parse error: " + ec.message);

client.connect();  <- **SEHException**

I have tested with native code debugging and throw an error from ovpncli.cpp (1116)

 OPENVPN_CLIENT_EXPORT void OpenVPNClient::connect_run()
    {
      state->io_context()->run(); <- Error
    }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the vcpkg build and .NET console flow described in the issue, starting with javacli/ovpncli.i and client/ovpncli.cpp around line 1116. Investigate the SEHException raised when OpenVPNClient::connect_run() runs the io_context; the issue does not define a confirmed fix or explicit completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, csharp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.