Skip to content
This repository was archived by the owner on Jul 7, 2024. It is now read-only.

Commit c3e46d5

Browse files
committed
document srv
1 parent 96928a7 commit c3e46d5

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

srv.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: SRV records
3+
---
4+
5+
[Hokuto](hokuto) supports settings SRV records per-peer. These are controlled by SRV allowances, which are in turn controlled by token-level SRV allowances.
6+
7+
## Getting Started
8+
9+
1. (Only if using azusa to push the peer you will use SRV records for.) Set token-level SRV allowances:
10+
11+
```nix
12+
{
13+
qrystal.services.cs.config.tokens = [{
14+
# name, hash, etc
15+
canSRVUpdate = true; # required for updating SRV records of any peer through this token
16+
srvAllowancesAny = true; # if true, no restrictions on SRV allowances through this token
17+
srvAllowances = [{
18+
# see nixos-modules.nix for details
19+
}];
20+
}];
21+
}
22+
```
23+
24+
2. Set peer-level SRV allowances.
25+
26+
```nix
27+
{
28+
qrystal.services.cs.config.central.networks.testnet.peers.testpeer = {
29+
allowedSRVs = [{
30+
service = "_sip"; # only SRV records with service equal to "_sip" allowed
31+
serviceAny = false;
32+
priorityMin = 0;
33+
priorityMax = 0;
34+
weightMin = 0;
35+
weightMax = 0;
36+
}];
37+
};
38+
}
39+
```
40+
41+
3. Provide a srv list to a node.
42+
43+
```nix
44+
{
45+
qrystal.services.node.config.srvList = pkgs.writeText "srvlist.json" (builtins.toJSON { Networks = {
46+
msb = [{
47+
Service = "_sip";
48+
Protocol = "_udp";
49+
Priority = 0;
50+
Weight = 0;
51+
Port = 5060;
52+
}];
53+
}; });
54+
}
55+
```

0 commit comments

Comments
 (0)