improved documentation
parent
0a3ebc78df
commit
695a65b8d0
@ -0,0 +1,74 @@
|
||||
{
|
||||
version = "v1";
|
||||
subnets = [
|
||||
{
|
||||
name = "myMesh";
|
||||
endpoints = [
|
||||
{
|
||||
# No match mean match any
|
||||
port = 51820;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
groups = [
|
||||
# groups field is expected, but can be empty
|
||||
];
|
||||
peers = [
|
||||
{
|
||||
name = "peer1";
|
||||
subnets = {
|
||||
myMesh = {
|
||||
listenPort = 51820;
|
||||
# empty ipAddresses will auto generate an IPv6 address
|
||||
};
|
||||
};
|
||||
publicKey = "t2kmvyJbDle433HCUlP48HxGlLdd8HyiRi2y8aYvTV8=";
|
||||
privateKeyFile = "/path/to/private/key"; # path is relative to the machine
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.11";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "peer2";
|
||||
subnets = {
|
||||
myMesh = {
|
||||
listenPort = 51820;
|
||||
};
|
||||
};
|
||||
publicKey = "xTiftEK/lzqxJYtbH8tt8yINEnSq7tTEN46hXTr9X2M=";
|
||||
privateKeyFile = "/path/to/private/key";
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.12";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "peer3";
|
||||
subnets = {
|
||||
myMesh = {
|
||||
listenPort = 51820;
|
||||
};
|
||||
};
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.13";
|
||||
}
|
||||
];
|
||||
publicKey = "jSp9uutNwpNHn1XjeQb9ixCixBSjvsRi2uYIiM2LORE=";
|
||||
privateKeyFile = "/path/to/private/key";
|
||||
}
|
||||
];
|
||||
connections = [
|
||||
{
|
||||
a = [{type= "subnet"; rule = "is"; value = "myMesh";}];
|
||||
b = [{type= "subnet"; rule = "is"; value = "myMesh";}];
|
||||
}
|
||||
];
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
{
|
||||
version = "v1";
|
||||
subnets = [
|
||||
{
|
||||
name = "myRing";
|
||||
endpoints = [
|
||||
{
|
||||
# No match means match any
|
||||
port = 51820;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
groups = [
|
||||
# groups field is expected, but can be empty
|
||||
];
|
||||
peers = [
|
||||
{
|
||||
name = "peer1";
|
||||
subnets = {
|
||||
myRing = {
|
||||
listenPort = 51820;
|
||||
# empty ipAddresses will auto generate an IPv6 address
|
||||
};
|
||||
};
|
||||
publicKey = "2CMNhw0CU2iFwKZvKT3dnqviBTKbJtuq5SNZvQpXCDY=";
|
||||
privateKeyFile = "/path/to/private/key"; # path is relative to the machine
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.11";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "peer2";
|
||||
subnets = {
|
||||
myRing = {
|
||||
listenPort = 51820;
|
||||
};
|
||||
};
|
||||
publicKey = "nU97PJin1r+g/jk4Jm9+xd0ibZKErESNeav4VjOQKlc=";
|
||||
privateKeyFile = "/path/to/private/key";
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.12";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "peer3";
|
||||
subnets = {
|
||||
myRing = {
|
||||
listenPort = 51820;
|
||||
};
|
||||
};
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.13";
|
||||
}
|
||||
];
|
||||
publicKey = "FNdLup5glVp5dlynS4ker75i+fIIJPs4ri5vQ+9sGnE=";
|
||||
privateKeyFile = "/path/to/private/key";
|
||||
}
|
||||
{
|
||||
name = "peer4";
|
||||
subnets = {
|
||||
myRing = {
|
||||
listenPort = 51820;
|
||||
};
|
||||
};
|
||||
publicKey = "Xa+AhcRbAdOufv5mEwR8V5GDkJ+AiRMxTjtAwmWBCVI=";
|
||||
privateKeyFile = "/path/to/private/key";
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.14";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
connections = [
|
||||
{
|
||||
# Connections go both ways, no need to do a = peer2 and b = peer1
|
||||
a = [{type= "peer"; rule = "is"; value = "peer1";}];
|
||||
b = [{type= "peer"; rule = "is"; value = "peer2";}];
|
||||
}
|
||||
{
|
||||
# Connections go both ways, no need to do a = peer2 and b = peer1
|
||||
a = [{type= "peer"; rule = "is"; value = "peer2";}];
|
||||
b = [{type= "peer"; rule = "is"; value = "peer3";}];
|
||||
}
|
||||
{
|
||||
# Connections go both ways, no need to do a = peer2 and b = peer1
|
||||
a = [{type= "peer"; rule = "is"; value = "peer3";}];
|
||||
b = [{type= "peer"; rule = "is"; value = "peer4";}];
|
||||
}
|
||||
{
|
||||
# Connections go both ways, no need to do a = peer2 and b = peer1
|
||||
a = [{type= "peer"; rule = "is"; value = "peer4";}];
|
||||
b = [{type= "peer"; rule = "is"; value = "peer1";}];
|
||||
}
|
||||
];
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
{
|
||||
version = "v1";
|
||||
subnets = [
|
||||
{
|
||||
name = "mySpoke";
|
||||
endpoints = [
|
||||
{
|
||||
# No match means match any
|
||||
port = 51820;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
groups = [
|
||||
# groups field is expected, but can be empty
|
||||
];
|
||||
peers = [
|
||||
{
|
||||
name = "central";
|
||||
subnets = {
|
||||
mySpoke = {
|
||||
listenPort = 51820;
|
||||
# empty ipAddresses will auto generate an IPv6 address
|
||||
};
|
||||
};
|
||||
publicKey = "whST3RRJziiQTIizeQW6z8fCtoiBfHK559WCY2RS4GQ=";
|
||||
privateKeyFile = "/path/to/private/key"; # path is relative to the machine
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.11";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "leaf1";
|
||||
subnets = {
|
||||
mySpoke = {
|
||||
listenPort = 51820;
|
||||
};
|
||||
};
|
||||
publicKey = "AgsXp89XUz545KRZiNzCYw1Jr6WC5zIfKZnq5M+UUkM=";
|
||||
privateKeyFile = "/path/to/private/key";
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.12";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "leaf2";
|
||||
subnets = {
|
||||
mySpoke = {
|
||||
listenPort = 51820;
|
||||
};
|
||||
};
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.13";
|
||||
}
|
||||
];
|
||||
publicKey = "1fn/kD11tWPc5VFAZn30PDM4nPoZoGPBEoVFnQdx62o=";
|
||||
privateKeyFile = "/path/to/private/key";
|
||||
}
|
||||
{
|
||||
name = "leaf3";
|
||||
subnets = {
|
||||
mySpoke = {
|
||||
listenPort = 51820;
|
||||
};
|
||||
};
|
||||
publicKey = "z5IfD9joAexurf2TyoKd49LrRFRN4JyCCPBAOJXqlGc=";
|
||||
privateKeyFile = "/path/to/private/key";
|
||||
endpoints = [
|
||||
{
|
||||
# no match can be any
|
||||
ip = "192.168.1.14";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
connections = [
|
||||
{
|
||||
a = [{type= "subnet"; rule = "is"; value = "mySpoke";}];
|
||||
b = [{type= "peer"; rule = "is"; value = "central";}];
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue