-
Notifications
You must be signed in to change notification settings - Fork 25
Moving to interactive service #20
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
Conversation
selvanair
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a bit hard to review this with all the refactoring going on. Would it be possible to split this with the refactoring and cleanup moved to a future PR? I thought the last commit would pretty much covers all that is needed for the iservice-based startup to work.
But my idea was exactly this - there are few commits for refactoring without any functional changes (like splitting functionality into different files) and this last commit is switching to iservice. |
8f34d3e to
7fd4ceb
Compare
|
Here you can get an installer with necessary changes to all components. At least here it works fine :) |
|
I think this service should start the interactive service, if it is not running already. |
It is now depends on interactive service https://github.com/OpenVPN/openvpn-build/pull/849/files so Windows should start iservice first. |
|
Ping @selvanair @d12fk |
d12fk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this could generally benefit from connecting to the management interface, just like the GUI does. Instead of polling, I mean.
|
Doxygen would be nice, but a bit more excessive commit messages, describing the things done in the commit, are missing often. |
No functional changes. GitHub: OpenVPN#19 Signed-off-by: Lev Stipakov <[email protected]>
Signed-off-by: Lev Stipakov <[email protected]>
Move OpenVPN service logic into a separate class which doesn't have any dependencies on Windows service infrastructure. Add a log delegate which is used to write logs either to console or event log. Add ability to run service logic as a standalone app. GitHub: OpenVPN#21 Signed-off-by: Lev Stipakov <[email protected]>
Signed-off-by: Lev Stipakov <[email protected]>
Instead of starting openvpn process directly: - connect to interactive service pipe - send startup info - read openvpn process pid (for polling) Since we use virtual service account, we don't have privileges to subscribe for process events, so instead we use async polling to check if process is alive and restart it of it is not. Removed Stop() since due to lack of privileges the only way now we can stop the process is to signal the event. GitHub: OpenVPN#23 Signed-off-by: Lev Stipakov <[email protected]>
Priority class cannot be set by the virtual service account so remove the code. Signed-off-by: Lev Stipakov <[email protected]>
The service is installed via MSI Wix script. GitHub: OpenVPN#24 Signed-off-by: Lev Stipakov <[email protected]>
Instead of having version number in multiple places, keep it in one place and generate AssemblyInfo.cs on the fly. While on it, add git commit hash to product version and bump version to 2.0.0.0. GitHub: OpenVPN#25 Signed-off-by: Lev Stipakov <[email protected]>
Mono version coming with Ubuntu 22.04 is an outdated and have bugs like inability to handle escaped semicolons (https://github.com/mono/mono/pull/1580/files). Bump to Mono 6.12 and switch to MSBuild (since xbuild is outdated). Signed-off-by: Lev Stipakov <[email protected]>
Made some commit messages more descriptive and added some XML comments - this is a standard way to document code in C# and is natively supported by Visual Studio (unlike Doxygen). Also, Doxygen is able to parse them. |
No description provided.