Comments (7)
Maybe the pre-connect and disconnect script timeouts are there just because of symmetry ("connect scripts have timeout, so these should too". Force-termination of scripts, coupled with a high default timeout value that is user-configurable makes sense in my opinion.
from openvpn-gui.
why to have timeouts at both openvpn (config files) and openvpn-gui?
are there cases which cannot be resolved with timeouts specified at openvpn config files?
from openvpn-gui.
Took a while to get back to this topic. Thanks for the comments.
@chipitsine : this is for scripts run directly by the GUI which is different from up/down scripts run by openvpn.
I think we can improve the timeout handling as below:
- preconnect_script: keep default timeout small (10s?), do not connect until script exits or times out, kill if still running, warn the user and proceed with the connection. The assumption is that the user wants this script to complete before connecting.
- connect_script: have a long default timeout, let the script run in a separate thread and let die on timeout. timeout=0 interpreted as infinite (i.e. never kill). The idea is that this may involve tasks like mapping shared drives which can sometimes take a while but the GUI need not wait for it to complete.
- disconnect_script: like the preconnect script this has to complete before disconnection so keep a small default timeout (10s?) and kill if not complete and then process the disconnection.
The main difference from the current behaviour would be (i) pre-connect and disconnect scripts are killed on timeout and (ii) connect script is not waited on. Also make sure windows events are handled during the wait so that the GUI doesn't appear to hang during the wait as it does now.
In the first and last cases the users who do not want the script to be killed can put the task into background and return promptly.
If this sounds sensible I'll make a patch.
from openvpn-gui.
@selvanair : as long as failed scripts create a warning this should improve things from user perspective, so a +1 for a patch.
from openvpn-gui.
Reviving this long forgotten thread in light of the recent thread on the users ML:
https://www.mail-archive.com/[email protected]/msg04367.html
In addition to what I had proposed we'd also need to treat preconnectscript failures as an error or have an option to do so.
from openvpn-gui.
Taking that email thread into account .. I think the pre-connect script should be able to terminate the attempt by the GUI to launch the openvpn binary with what ever config.
(That does not appear to have been made clear so far)
from openvpn-gui.
Yep. Had forgotten that crucial detail until I went back read what I wrote in this thread a long time ago :)
from openvpn-gui.
Related Issues (20)
- Could not parse --management option HOT 12
- OpenVPN Pre-Logon Access Provider HOT 8
- Textbox for 2fa security code HOT 26
- Tray icon context menu triggers filesystem walk
- Can't see ip address in tray tooltip HOT 8
- Service> OpenThreadToken Access Denied HOT 1
- Tray icon and text not updated in some cases
- Copyright timestamp needs updating to 2024 HOT 1
- PLAP Auto Connection HOT 4
- > Greate Fie for stdout 系统找不到指定的文件 HOT 2
- Add setting to reestablish last VPN connection on application start HOT 1
- Minor Windows GUI flaw: white strip on 125% dpi HOT 2
- OpenVPN GUI (SBL/PLAP) setting doesn't work with Dynamic Challenge HOT 6
- Reintroduce the private key password change feature HOT 2
- Does SAML work with using SBL/PLAP with OpenVPN GUI? HOT 7
- OpenVPN DCO connect error with TCP port on Windows client HOT 8
- i have a I have a problem verifying the certificate HOT 1
- Move application data to %APPDATA% HOT 1
- [BUG] OpenVPN 2.6.9+ can't be installed/updated on Windows 11 HOT 3
- Blurry eye icons when UI scaling is set HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openvpn-gui.