OpenVPN / OpenVPN/openvpn3

When openvpn signnal "CONNECTED" event, it did not already connecetd , and tun deivice is not created in 4-5seconds

Open
#82 6 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

Now, I am creating a openvpn client using the API on win platform.
I need to do something when I get the sinal of "CONENECTED" which means the vpn network is ok.

The issue is now, when I receiver the ”CONNECTED” event, the tun network device did not created finished, it takes 4-5 seoncds after get "CONNECED" event ,then the tun decice create and network is ok.

Could you help me if there any event or how can I know the network is ready ?
Can you help to fix the issue after the "CONNECTED" event signaled, it takes 4-5 seconds to finish create the tun device ?
The related of the code to signal the "CONNECTED " event is bellow:
==== in tuncli.hpp
virtual void tun_start(const OptionList& opt, TransportClient& transcli, CryptoDCSetting&) overide
{
...................
if(!dhcp_capture)
parent.tun_connected(); //signal that we are connected
}

===
thanks very much!
BR,
wsktree

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

Start in tuncli.hpp at tun_start(), especially the parent.tun_connected() signal and the dhcp_capture condition. Investigate the event ordering on Windows and determine when the TUN device is actually ready after CONNECTED. Done means the API exposes a reliable readiness signal or otherwise documents how callers can detect network readiness.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.