Closed
Description
The existing code doesn't handle a case where config values can contain spaces.
For example, it would be very common for a Wireguard config file to contain multiple IPs in the AllowedIPs
key:
AllowedIPs = 1.2.3.4/12, 3.4.5.6/28
The existing conversion approach would transform this to:
AllowedIPs = "1.2.3.4/12", 3.4.5.6/28
Also, when parsing of the generated TOML file fails vopono spits out the error from the TOML parser at the end of all the normal log messages with no context at all and it's really not obvious what's going wrong. For example:
2022-02-04T21:00:26.385Z DEBUG vopono::host_masquerade > Remaining namespaces: Ok({})
2022-02-04T21:00:26.385Z DEBUG vopono::util > nft delete table inet vopono_bridge
2022-02-04T21:00:26.387Z DEBUG vopono::util > ip netns delete vopono_c_F5pZNHKr4DL
Error: expected newline, found an identifier at line 12 column 28
Metadata
Metadata
Assignees
Labels
No labels