dns

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*orchestrator.Orchestrator
}

func New

New creates a new DNS service. The service helps applications find out the IP addresses of other satellites. It uses the custom (made up) "celestial." TLD. A satellite DNS record has the form [ID].[SHELL].celestial, where [ID] is the identifier and [SHELL] is the index of the shell of the satellite. That maps to an IP address. Additionally, ground station IP addresses can be determined with [NAME].gst.celestial, where NAME is the ground station name. Our DNS server supports only queries, only UDP (no DNSSEC), and only A records. This service relies on configuring systemd-resolved to use our DNS server for the celestial TLD.

func (*Server) Start

func (d *Server) Start(port uint64) error

Start starts our DNS service. We first check if systemd-resolved is available and panic otherwise. We then place a configuration file in /etc/systemd/resolved.conf.d/celestial.conf that contains the following:

```conf [Resolve] DNS=127.0.0.1:[port] Domains=~celestial DNSStubListener=no DNSStubListenerExtra=0.0.0.0:53 ```

We then restart systemd-resolved.

func (*Server) Stop

func (d *Server) Stop() error

Stop stops our DNS service. We remove the configuration file we placed in /etc/systemd/resolved.conf.d/celestial.conf and restart systemd-resolved.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL