8000 Conversion from Wireguard configuration to TOML fails in many cases · Issue #132 · jamesmcm/vopono · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Conversion from Wireguard configuration to TOML fails in many cases #132
Closed
@vulpyne

Description

@vulpyne

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0