Hi awesome project and exactly what I was looking for, the only problem I have is that I would want to be able to define peers via the NixOS module, but the resulting dsnetconfig.json looks like this:
{
"ExternalHostname": "vpn.redacted.net",
"ExternalIP": "redacted",
"ExternalIP6": "",
"ListenPort": 51820,
"Domain": "dsnet",
"InterfaceName": "dsnet",
"Network": "10.61.120.0/22",
"Network6": "fd00:d39:b640:2800::/64",
"IP": "10.61.120.1",
"IP6": "fd00:d39:b640:2800:dd88:9208:2fe4:b6e6",
"DNS": "",
"Networks": [],
"PrivateKey": "redacted",
"PostUp": "",
"PostDown": "",
"Peers": [
{
"Hostname": "",
"Owner": "",
"Description": "",
"IP": "",
"IP6": "",
"Added": "0001-01-01T00:00:00Z",
"Networks": null,
"PublicKey": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"PresharedKey": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
}
],
"PersistentKeepalive": 25,
"MTU": 1420
}
If I provide a peer like this in NixOS:
{
"ExternalHostname": "vpn.redacted.net",
"ExternalIP": "redacted",
"ExternalIP6": "",
"ListenPort": 51820,
"Domain": "dsnet",
"InterfaceName": "dsnet",
"Network": "10.61.120.0/22",
"Network6": "fd00:d39:b640:2800::/64",
"IP": "10.61.120.1",
"IP6": "fd00:d39:b640:2800:dd88:9208:2fe4:b6e6",
"DNS": "",
"Networks": [],
"PrivateKey": "redacted",
"PostUp": "",
"PostDown": "",
"Peers": [
{
"Hostname": "",
"Owner": "",
"Description": "",
"IP": "",
"IP6": "",
"Added": "0001-01-01T00:00:00Z",
"Networks": null,
"PublicKey": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"PresharedKey": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
}
],
"PersistentKeepalive": 25,
"MTU": 1420
}
I'm still not sure on how to handle dsnet add in that case tho. But I would love to be able to generate the config via dsnet add and then just add it to my Nix config.
Hi awesome project and exactly what I was looking for, the only problem I have is that I would want to be able to define peers via the NixOS module, but the resulting
dsnetconfig.jsonlooks like this:{ "ExternalHostname": "vpn.redacted.net", "ExternalIP": "redacted", "ExternalIP6": "", "ListenPort": 51820, "Domain": "dsnet", "InterfaceName": "dsnet", "Network": "10.61.120.0/22", "Network6": "fd00:d39:b640:2800::/64", "IP": "10.61.120.1", "IP6": "fd00:d39:b640:2800:dd88:9208:2fe4:b6e6", "DNS": "", "Networks": [], "PrivateKey": "redacted", "PostUp": "", "PostDown": "", "Peers": [ { "Hostname": "", "Owner": "", "Description": "", "IP": "", "IP6": "", "Added": "0001-01-01T00:00:00Z", "Networks": null, "PublicKey": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "PresharedKey": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" } ], "PersistentKeepalive": 25, "MTU": 1420 }If I provide a peer like this in NixOS:
I'm still not sure on how to handle
dsnet addin that case tho. But I would love to be able to generate the config viadsnet addand then just add it to my Nix config.