Alejandro Mery
098482a890
wireguard: ini.Unmarshal() [WIP]
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
0a48a40796
build-sys: use local asciigoat.org/ini
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
3c24e24d71
wireguard: switch from gcfg to asciigoat.org/ini/basic
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
45dc2291bf
Merge pull request 'remove unused arguments and update dependencies' ( #40 ) from pr-amery-chores into main
...
Reviewed-on: #40
10 months ago
Alejandro Mery
b019d303d4
chore: update dependencies
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
f64f4e08fe
cluster: remove unused variables on scan option factories
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
10 months ago
Alejandro Mery
cf09cfa743
Merge pull request 'cluster: handle regions on filesystem' ( #39 )
...
Reviewed-on: #39
1 year ago
Alejandro Mery
00cf3959a2
cluster: load regions when scanning a directory
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
0db3e18227
cluster: introduce SyncRegions() to write regions file
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
0094450ca8
cluster: fix regions/zones mapping when the region exists
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
a910bba406
Merge pull request 'cluster: introduce Machine.Inactive flag' ( #38 )
...
Reviewed-on: #38
1 year ago
Alejandro Mery
5ef6d45ef7
Merge pull request 'jpictl: fix cloud.yaml unmarshalling' ( #32 )
...
Reviewed-on: #32
1 year ago
Alejandro Mery
99998dc7e8
cluster: mark Machine as Inactive if the "region" file contains "none"
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
892d849740
cluster: introduce Machine.Inactive flag
...
if a Machine is Inactive, it won't be included on the DNS
aliases for the zone or it's regions.
v2:
- Machine.Active() renamed to Machine.IsActive()
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
125a4c0dbe
wireguard: implement EndpointAddress.UnmarshalText
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
7c811d7813
wireguard: implement UnmarshalText for PrivateKey and PublicKey
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
1580c09746
cluster: add Machine.ReadLines() shortcut
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
a928ab8880
Merge pull request 'jpictl: add flags to control the default scan' ( #34 )
...
Reviewed-on: #34
1 year ago
Alejandro Mery
66fc213f64
Merge pull request 'cluster: improve defaults to ease initialisation of new machines' ( #31 )
...
Reviewed-on: #31
1 year ago
Alejandro Mery
944400249f
Merge pull request 'jpictl: create machine directories on `jpictl write`' ( #33 )
...
Reviewed-on: #33
1 year ago
Alejandro Mery
1492061ab8
jpictl: create machine directories on `jpictl write`
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
57e1077a85
cluster: add MkdirAll() support
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
5a3d483f98
cluster: refactor Machine.ReadFile() and Machine.OpenFile()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
0ff17abd59
Merge pull request 'cluster: add top level ReadLines(), WriteStringFile() and RemoveFile() helpers' ( #36 )
...
Reviewed-on: #36
1 year ago
Alejandro Mery
a742bad084
Merge pull request 'dns: sort zones when writing data' ( #35 )
...
Reviewed-on: #35
1 year ago
Alejandro Mery
629b6ee74f
Merge pull request 'cluster: sort regions, for `jpictl dump` sake' ( #37 )
...
Reviewed-on: #37
1 year ago
Alejandro Mery
884b11d1f9
cluster: sort regions, for `jpictl dump`' sake
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
5bbe15ef24
cluster: move SortRegions() from dns to cluster
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
fd1c57d377
cluster: introduce Cluster.ReadLines()
...
reading a file, splitting and trimming lines, and
allowing # to comment a line out
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
2fd5947f1b
cluster: introduce Cluster.WriteStringFile()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
14b3d91191
cluster: introduce Cluster.RemoveFile()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
abe3005769
dns: sort zones when writing data
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
727fd67bc6
jpictl: add --domain/-D and --scan-dir/-d options
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
b8e1b321e5
jpictl: add `-S` flag to ignore the config file and always scan
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
0c5429a681
jpictl: move verbosity handling to the log module
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
e5639b2f4e
cluster: generate ring keys on scan if missing
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
543824a54a
cluster: allow empty wgN.conf files as markers to enable the ring
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
9ab7594bcc
Merge pull request 'jpictl: add initial `dns add` command' ( #29 )
...
Reviewed-on: #29
1 year ago
Nagy Károly Gábriel
07d4f462a3
Merge pull request 'wireguard: fix KeyPair.Validate()' ( #30 )
...
Reviewed-on: #30
1 year ago
Alejandro Mery
142ea00577
wireguard: fix KeyPair.Validate()
...
PrivateKey and PublicKey are now fixed length arrays,
so testing for len 0 is invalid
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
052f89152c
jpictl/dns: introduce add command to register new machines
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
557f156579
dns: refactor asSyncRecords()
...
for direct access of the unsorted map
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
e857ff7456
Merge pull request 'dns: refactor record formatting and sort show results' ( #28 )
...
Reviewed-on: #28
1 year ago
Alejandro Mery
9da49f2d86
dns/show: sort records
...
v2: change Name to lower case and Type to upper case before comparing
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
356322bc94
dns/show: introduce writeRecords() helper
...
to print a whole []libdns.Record
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
7dac96f474
dns/show: refactor Record formatting
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
134606207d
Merge pull request 'jpictl: introduce `jpictl dns show` command' ( #27 )
...
Reviewed-on: #27
1 year ago
Alejandro Mery
66178923a3
chore: update darvaza.org/resolver to support the darvaza.org/core update
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
440dcde50a
jpictl: introduce `jpictl dns show` command
...
to list dns entries
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
c578990f8c
jpictl: refactor dns command initialization
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago