netbird icon indicating copy to clipboard operation
netbird copied to clipboard

Separate configuration from state

Open misuzu opened this issue 3 years ago • 0 comments

Right now there is a config.json file which is not really a config, but state (see this issue to get a rough idea on why this is bad). There should be a way to set configuration values (at least WgIface and IFaceBlackList) in an automated way using environment variables and/or cmdline options and/or a separate true configuration file.

{
    "PrivateKey": "<........>",
    "PreSharedKey": "",
    "ManagementURL": {
        "Scheme": "https",
        "Opaque": "",
        "User": null,
        "Host": "api.wiretrustee.com:443",
        "Path": "",
        "RawPath": "",
        "ForceQuery": false,
        "RawQuery": "",
        "Fragment": "",
        "RawFragment": ""
    },
    "AdminURL": {
        "Scheme": "https",
        "Opaque": "",
        "User": null,
        "Host": "app.netbird.io",
        "Path": "",
        "RawPath": "",
        "ForceQuery": false,
        "RawQuery": "",
        "Fragment": "",
        "RawFragment": ""
    },
    "WgIface": "wt0",
    "IFaceBlackList": [
        "wt0",
        "tun0",
        "zt",
        "ZeroTier",
        "utun",
        "wg",
        "ts",
        "Tailscale",
        "tailscale"
    ],
    "SSHKey": "-----BEGIN PRIVATE KEY-----\n<........>\n-----END PRIVATE KEY-----\n"
}

misuzu avatar Aug 20 '22 18:08 misuzu