Skip to content
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

Make conversion from Wireguard config format to TOML more robust and improve error output. #133

Merged
merged 3 commits into from
Feb 5, 2022

Conversation

vulpyne
Copy link
Contributor

@vulpyne vulpyne commented Feb 4, 2022

This change improves the regexp matching Wireguard config key/value pairs to allow spaces within the value.

It also improves the error message in the case where parsing the transformed config fails.

I don't think this regexp-based approach can actually be reliable (for one thing the PostUp and similar config keys could contain double quotes) but these changes should make failure less likely in the common case.

Closes #132

@jamesmcm
Copy link
Owner

jamesmcm commented Feb 5, 2022

Thanks, this is great 🙂

@jamesmcm jamesmcm merged commit 92b11b0 into jamesmcm:master Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conversion from Wireguard configuration to TOML fails in many cases
2 participants