-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client-connect Deferred #632
Comments
This is really not what the issue tracker is for (tracking bugs, not answering user question). If your script runs truly async, and OpenVPN is not waiting for it, you forgot to tell OpenVPN that you want to do deferred operations. One of my test scripts does approximately this:
|
Hello, Thank you very much for your response. I understand the issue now. However, I have an additional question regarding how this is handled in the plugin. Could you please explain the differences between client_connect_v1, client_connect_v2, and client_connect_defer? Additionally, could you clarify which of these are compatible with API version 2? I would also appreciate an explanation on how to implement each of these. |
Look at There also is a |
Thank you very much. I reviewed the file, but when I checked, I noticed that the environment variables were not set. Should we manually set these values, and are they necessary for the functionality? Additionally, I have another question: is it possible to run connect_v2 in a truly deferred manner on its own, or does it require connect_v2_defer? Lastly, is version 2 compatible only with API V3? I would be grateful if you could provide more details. Thank you for your assistance. |
The
No idea about API versions (I would need to go and read files), but I'm not sure why this is a relevant question. The script, as provided, works with OpenVPN 2.5 and up (and anything earlier does not have deferred client-connect yet). So "this is the API version you want to use". |
Hello,
We implemented client-connect deferred based on the documentation and sample code provided in this repository, without setting any environment variables as mentioned in the README.
Currently, we’re encountering an issue: instead of handling connections in a truly deferred manner, the plugin operates asynchronously. This allows clients to connect immediately, and only afterward does the plugin carry out the intended client-connect logic.
Our goal is to have clients wait until the client-connect process completes, so they aren’t fully connected until the plugin determines whether they should be granted access or rejected. In other words, we need a solution where client-connect can run without stalling the main OpenVPN thread, while still controlling the client’s access based on the client-connect outcome.
Could you please guide us on how to achieve this behavior?
Thank you very much!
The text was updated successfully, but these errors were encountered: