Finally a simple interface for domain names https://happydomain.org/
Go to file
nemunaire a268ca7f9a Add .drone.yml for CI 2020-12-08 18:25:23 +01:00
admin admin: add routes to manage sessions 2020-12-08 18:25:23 +01:00
api Force deletion of the auth cookie when session has expired 2020-12-08 18:25:23 +01:00
config Document code 2020-12-08 18:25:22 +01:00
generators Don't use full package path as source identifier 2020-12-08 18:25:22 +01:00
htdocs Start working on translation 2020-12-08 18:25:23 +01:00
model Document code 2020-12-08 18:25:22 +01:00
services Document code 2020-12-08 18:25:22 +01:00
sources sources/ddns: check domain existance through SOA 2020-12-08 18:25:23 +01:00
storage Document code 2020-12-08 18:25:22 +01:00
utils Sender address is now configurable through MAIL_FROM 2020-12-08 18:25:22 +01:00
.drone.yml Add .drone.yml for CI 2020-12-08 18:25:23 +01:00
.gitignore Change project name from libredns to happydns.org 2020-05-11 00:18:49 +02:00
LICENSE Add LICENSE (CeCILL v2.1) 2020-05-11 00:18:50 +02:00
README.md Document code 2020-12-08 18:25:22 +01:00
generate.go Generalize the icon generation 2020-05-11 00:19:49 +02:00
go.mod Able to send mail 2020-06-24 18:28:04 +02:00
go.sum Able to send mail 2020-06-24 18:28:04 +02:00
main.go Implement Gandi.net's LiveDNS API 2020-12-08 18:25:22 +01:00
static.go Document code 2020-12-08 18:25:22 +01:00

README.md

happyDNS

Finally a simple, modern and open source interface for domain name.

It consists of a HTTP REST API written in Golang (primarily based on https://github.com/miekg/dns) with a nice web interface written in Vue.js. It runs as a single stateless Linux binary, backed by a database (currently: LevelDB, more SGBD to come soon).

Features

TODO

Building

Dependancies

In order to build the happyDNS project, you'll need the following dependancies:

  • go at least version 1.13
  • go-bindata
  • nodejs tested with version 14.4.0
  • yarn tested with version 1.22.4

Instructions

  1. First, I'll need to prepare the frontend.

Go inside the htdocs/ directory and install the node modules dependancies:

cd htdocs/
yarn install
  1. Generates assets files used by Go code:
cd .. # Go back to the root of the project
go generate
  1. Build the Go code:
go build

The command will create a binary happydns you can use standalone.

Install at home

The binary comes with sane default options to start with. You can simply launch the following command in your terminal:

./happydns

After some initialization, it should show you:

Admin listening on ./happydns.sock
Ready, listening on :8081

Go to http://localhost:8081/ to start using happyDNS.

Database configuration

By default, the LevelDB storage engine is used. You can change the storage engine using the option -storage-engine other-engine.

The help command ./happydns -help can show you the available engines. By example:

-storage-engine value
	Select the storage engine between [leveldb mysql] (default leveldb)

LevelDB

-leveldb-path string
	Path to the LevelDB Database (default "happydns.db")

By default, a new directory is created near the binary, called happydns.db. This directory contains the database used by the program. You can change it to a more

Persistant configuration

The binary will automatically look for some existing configuration files:

  • ./happydns.conf in the current directory;
  • $XDG_CONFIG_HOME/happydns/happydns.conf;
  • /etc/happydns.conf.

Only the first file found will be used.

It is also possible to specify a custom path by adding it as argument to the command line:

./happydns /etc/happydns/config

Config file format

Comments line has to begin with #, it is not possible to have comments at the end of a line, by appending # followed by a comment.

Place on each line the name of the config option and the expected value, separated by =. For example:

storage-engine=leveldb
leveldb-path=/var/lib/happydns/db/

Environment variables

It'll also look for special environment variables, beginning with HAPPYDNS_.

You can achieve the same as the previous example, with the following environment variables:

HAPPYDNS_STORAGE_ENGINE=leveldb
HAPPYDNS_LEVELDB_PATH=/var/lib/happydns/db/

You just have to replace dash by underscore.

Development environment

If you want to contribute to the frontend, instead of regenerating the frontend assets each time you made a modification (with go generate), you can use the development tools:

In one terminal, run happydns with the following arguments:

./happydns -dev http://127.0.0.1:8080

In another terminal, run the node part:

cd htdocs/
yarn run serve

With this setup, static assets integrated inside the go binary will not be used, instead it'll forward all request for static assets to the node server, that do dynamic reload, etc.