modules/ipfs: configure composable routing

This commit is contained in:
Max Headroom 2023-11-16 10:51:50 +01:00
parent 666a591077
commit ac2fb19ad7

View file

@ -64,6 +64,84 @@ in {
StorageGCWatermark = 90; StorageGCWatermark = 90;
StorageMax = "200GB"; StorageMax = "200GB";
}; };
Routing = {
Type = "custom";
Routers = {
LanDHT = {
Type = "dht";
Parameters = {
Mode = "auto";
PublicIPNetwork = false;
AcceleratedDHTClient = false;
};
};
WanDHT = {
Type = "dht";
Parameters = {
Mode = "auto";
PublicIPNetwork = true;
AcceleratedDHTClient = true;
};
};
CidContact = {
Type = "http";
Parameters.Endpoint = "https://cid.contact";
};
PrivateVoid = {
Type = "http";
Parameters.Endpoint = "https://p2p.privatevoid.net";
};
AllDHT = {
Type = "parallel";
Parameters.Routers = [
{
RouterName = "WanDHT";
IgnoreErrors = false;
Timeout = "30s";
}
{
RouterName = "LanDHT";
IgnoreErrors = false;
Timeout = "10s";
}
];
};
Parallel = {
Type = "parallel";
Parameters.Routers = [
{
RouterName = "WanDHT";
IgnoreErrors = false;
Timeout = "30s";
}
{
RouterName = "LanDHT";
IgnoreErrors = false;
Timeout = "10s";
}
{
RouterName = "CidContact";
IgnoreErrors = true;
Timeout = "10s";
ExecuteAfter = "3s";
}
{
RouterName = "PrivateVoid";
IgnoreErrors = true;
Timeout = "5s";
ExecuteAfter = "1s";
}
];
};
};
Methods = {
find-peers.RouterName = "Parallel";
find-providers.RouterName = "Parallel";
get-ipns.RouterName = "Parallel";
put-ipns.RouterName = "Parallel";
provide.RouterName = "AllDHT";
};
};
}; };
}; };