-
Notifications
You must be signed in to change notification settings - Fork 403
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
feat: Added ability to feed config from memory instead of file #348
base: master
Are you sure you want to change the base?
Conversation
Could you expand on your usecase when exactly you need this? The normal use case for the client library is already to pass an object that holds the config in memory. What use case do you have that you need to have some file reference in your configuration that cannot be in the configuration itself as well |
What do you mean? Currently, the only way i see is to pass config file name as an argument. Moreover, file name MUST end with .ovpn, if not, error will be thrown. I'm talking about ovpncli utility interface. I can explain my use case in more details. Currently, i use openvpn v2 and it has no problem consuming /dev/fd/... |
Have a look here: https://codeberg.org/OpenVPN/openvpn3-linux/src/branch/master/src/tests/misc/config-export-json-test.cpp The OpenVPN 3 Linux project has an extension to OptionList which adds a JSON import/export + string export features. That's implemented here: https://codeberg.org/OpenVPN/openvpn3-linux/src/branch/master/src/common/core-extensions.hpp. If you just need the This handles the configuration entirely in memory, by reading the entire config either from file or |
@dsommers I need this functionality for macos. AFAIK, there is no way to build openvpn3-linux for this os, or i missed something? At least, i cannot locate the code handling macos DNS settings. Also, i found existence of two separate openvpnv3-based clients kinda frustrating, because ovpncli supports DNS push on macos, but not on linux. And openvpn3-linux is a very good tool with near-to-full backward interface compatibility with openvpnv2 but it does not support macos at all... |
@yma-het ovpncli is not an official client, it is just meant as a test tool. So that doesn't exist as client apart from the test applications. So there is only one official Linux client which is openvpn3-linux and there is also only one official macOS client, which is called "OpenVPN Connect". The missing features like certificate management and proper configuration management are just not in scope of this client. We understand that this client could be used as VPN client but it has other shortcoming and quirks as well. The inconsistencies what Is there any reason you cannot use Tunnelblick, OpenVPN Connect or openvpn with with an Also we are looking to implement native DNS support in macos for OpenVPN 2.x There is also another reason to prevent the PR in its current form. You are modifying a central file that is used in a lot more places than just |
@schwabe Looks that ovpncli on macos and openvpn2 wrapper on openvpn3 on linux are my best options in such case. Or i missing something?
Eyah, this is a good point, i'll fix it. Thanks! |
You are using a client a that has been only developed and maintained as a test client as productive tool. I would strictly recommend against using that tool for that purpose. A proper openvpn3 based command line client for macOS simply does not does exist. |
In some cases we want config to exist only in memory. In such case /dev/fd is very handy.