-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support for using Wireguard config files #3
Comments
Do you know a library that can parse them? Previously I had a go with pythons built-in ini parser, but it doesn't handle repeated sections. |
@dadevel Probably this one: https://github.com/fictivekin/wireguard it has support for loading and writing WireGuard configs using Python. |
Maybe you can hack something together? |
the import configparser
config = configparser.ConfigParser(strict=False)
#config.read("config.ini")
config.read_string("""
[a]
a1=1
[a]
a2=2
""")
print(dict(config['a'])) # {'a1': '1', 'a2': '2'} stackoverflow: Parsing configure file with same section name in python edit: nope. multiple |
Maybe reopen this issue as it is does not seems resolved? |
I wont work on this feature myself, because I don't have a use case for it, but I welcome every pull request. |
Are there plans to add support for Wireguard native config files instead of JSON?
The text was updated successfully, but these errors were encountered: