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

Latest commit

 

History

History
55 lines (47 loc) · 1.26 KB

srv.md

File metadata and controls

55 lines (47 loc) · 1.26 KB
title
SRV records

Hokuto supports settings SRV records per-peer. These are controlled by SRV allowances, which are in turn controlled by token-level SRV allowances.

Getting Started

  1. (Only if using azusa to push the peer you will use SRV records for.) Set token-level SRV allowances:
{
  qrystal.services.cs.config.tokens = [{
    # name, hash, etc
    canSRVUpdate = true; # required for updating SRV records of any peer through this token
    srvAllowancesAny = true; # if true, no restrictions on SRV allowances through this token
    srvAllowances = [{
      # see nixos-modules.nix for details
    }];
  }];
}
  1. Set peer-level SRV allowances.
{
  qrystal.services.cs.config.central.networks.testnet.peers.testpeer = {
    allowedSRVs = [{
      service = "_sip"; # only SRV records with service equal to "_sip" allowed
      serviceAny = false;
      priorityMin = 0;
      priorityMax = 0;
      weightMin = 0;
      weightMax = 0;
    }];
  };
}
  1. Provide a srv list to a node.
{
  qrystal.services.node.config.srvList = pkgs.writeText "srvlist.json" (builtins.toJSON { Networks = {
    msb = [{
      Service = "_sip";
      Protocol = "_udp";
      Priority = 0;
      Weight = 0;
      Port = 5060;
    }];
  }; });
}