Commit graph

11 commits

Author SHA1 Message Date
Kristoffer Dalby
b5841c8a8b Rework getAvailableIp
This commit reworks getAvailableIp with a "simpler" version that will
look for the first available IP address in our IP Prefix.

There is a couple of ideas behind this:

* Make the host IPs reasonably predictable and in within similar
  subnets, which should simplify ACLs for subnets
* The code is not random, but deterministic so we can have tests
* The code is a bit more understandable (no bit shift magic)
2021-08-02 21:57:45 +01:00
Kristoffer Dalby
309f868a21 Make IP prefix configurable
This commit makes the IP prefix used to generate addresses configurable
to users. This can be useful if you would like to use a smaller range or
if your current setup is overlapping with the current range.

The current range is left as a default
2021-08-02 20:06:26 +01:00
Juan Font Alonso
ff9d99b9ea Use gorm connection pool 2021-07-04 21:40:46 +02:00
Juan Font Alonso
aa27709e60 Update code to Tailscale 1.10 2021-06-25 18:57:08 +02:00
Juan Font Alonso
69ba750b38 Update Headscale to depend on gorm v2 2021-06-24 15:44:19 +02:00
Juan Font Alonso
33bee1df05 Do not print stuff in the library 2021-05-08 13:27:40 +02:00
Juan Font Alonso
744c687d37 Fixed linting issues 2021-05-06 01:01:45 +02:00
Juan Font Alonso
486faa9656 WIP Working on authkeys + tests 2021-05-05 23:00:04 +02:00
Juan Font Alonso
5d3c80a192 Seed the random IP address generator 2021-02-21 22:11:27 +01:00
Juan Font Alonso
c5fbc5baa8 Bumped dependencies 2021-02-20 22:43:07 +01:00
Juan Font Alonso
7198c8bd77 Initial commit 2020-06-21 12:32:08 +02:00