zerotier / zeronsd

A DNS server for ZeroTier users
https://zerotier.com
BSD 3-Clause "New" or "Revised" License
493 stars 57 forks source link

It doesn't like toml formatted config, or I can't figure out the format. #156

Closed laduke closed 2 years ago

laduke commented 2 years ago

I have a json config that works:

{ "domain": "tarv.xyz", "token": "/etc/zeronsd/token", "hosts": "/etc/zeronsd/hosts", "wildcard": true }

If I convert that to toml through some website that does json to toml:

domain = "tarv.xyz"
token = "/etc/zeronsd/token"
hosts = "/etc/zeronsd/hosts"
wildcard = false

I get an error: [2022-02-22T22:26:05Z ERROR zeronsd::cli] invalid type: string "domain = \"tarv.xyz\" token = \"/etc/zeronsd/token\" hosts = \"/etc/zeronsd/hosts\" wildcard = false", expected struct Launcher at line 1 column 1


Edit:

Oh sorry! with --config-type=toml, it works.

It seems detect json and yaml automatically without using that flag.

erikh commented 2 years ago

that's because JSON is also valid YAML (honest; look it up). Closing this one as invalid. Ha!

laduke commented 2 years ago

that's because JSON is also valid YAML (honest; look it up).

good grief!