Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Great tool... thanks for sharing it.
This PR offers some small improvements I made in response to issues I had getting up and running.
Firstly, I was also confused by the OTP handling as in #104. It turns out the documentation mentions both "-o" and "--otp" switches, but only the latter was implemented in the code. I have added handling for the short option here. This may possibly close issue #104 as one option literally didn't exist and there is a spelling mistake in the second option in his example.
Secondly, I was having DNS issues due to the search option of resolv.conf not being supported. This information doesn't come back from my VPN end-point when the tunnel is established so it seems right that the client doesn't set it. As a workaround I added support to the configuration file for defining custom scripts to call on tunnel up and interface down events. For my case I manipulate this search parameter from a shell script called by openfortivpn when these events occur. I'm sure there would be other use cases; It seems to be a feature present in other VPN clients.
Please consider these for inclusion. C is not my most comfortable language so hopefully it is acceptable. It has tested okay over a few days on my machine.
Thanks