Commit graph

471 commits

Author SHA1 Message Date
Matthew R. Kasun 92d3e40bde logging 2022-04-13 17:33:40 -04:00
Matthew R. Kasun 6aa1a68a6f register command - client 2022-04-13 15:25:35 -04:00
Matthew R. Kasun 199ea15b1d add VerifyConnection func to NewTLSConf as InsecureSkipVerify:false doesn't work
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-04-13 11:58:15 -04:00
Matthew R. Kasun a0e7163e7e program to generate initial server certs/key 2022-04-12 17:19:24 -04:00
Matthew R. Kasun ab8cf43b3b remove debug logs
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-04-12 15:43:53 -04:00
Matthew R. Kasun 9897b2228c mqttSetup refactor
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-04-12 15:16:06 -04:00
Matthew R. Kasun 935567761b mq direct to server public ip 2022-04-12 10:43:02 -04:00
dcarns 94d843c3bd
Merge pull request #953 from gravitl/feature_v0.12.2_list_id
Feature v0.12.2 list
2022-03-23 20:33:35 -04:00
john s d1fb0b90af
netclient: math.Rand -> crypto.Rand (#956)
* netclient: math.Rand -> crypto.Rand

Signed-off-by: John Sahhar <john@gravitl.com>

* netclient: math.Rand -> crypto.Rand

* add tests

Signed-off-by: John Sahhar <john@gravitl.com>

* netclient: math.Rand -> crypto.Rand

* add test

Signed-off-by: John Sahhar <john@gravitl.com>
2022-03-23 12:06:26 -06:00
0xdcarns a477eaa767 added local node ID's to list command 2022-03-22 15:33:38 -04:00
0xdcarns 4cd75f2985 initial commit 2022-03-22 15:13:48 -04:00
Matthew R. Kasun 11b1098390 replace ncutil.Log/PrintLog with logger.Log 2022-03-21 11:27:25 -04:00
dcarns 9efb15e688
Merge pull request #929 from gravitl/bugfix_v0.12.0_keepalive
keepalive handling updates
2022-03-21 10:41:01 -04:00
dcarns b397f5014f
Merge pull request #918 from gravitl/bugfix_v0.12.1_hostctl_profile_names
use interface as hostctl profile
2022-03-21 10:24:28 -04:00
Matthew R. Kasun c16687be61 keepalive handling updates 2022-03-21 07:07:50 -04:00
john s 24f292c934
netclient: pass by value -> reference (#919)
* netclient: pass by value -> reference

Updates various function arguments to accept config.ClientConfig
as a reference to avoid deep copying the struct.

Signed-off-by: John Sahhar <john@gravitl.com>
2022-03-20 23:43:17 -05:00
Matthew R. Kasun b1a640eb83 temp code to remove netmaker profiles from /etc/hosts on daemon start 2022-03-18 15:53:59 -04:00
Matthew R. Kasun 58988706d9 missed on call
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-03-18 13:47:03 -04:00
Matthew R. Kasun 3b12f55de0 use interface as hostctl profile 2022-03-18 10:10:34 -04:00
afeiszli fbb18d86d0 fixing windows join issue 2022-03-15 11:11:22 -04:00
Matthew R. Kasun 628f1f1468 remove debug logs 2022-03-14 16:32:14 -04:00
Matthew R Kasun 11e0bd20d3 dns per network 2022-03-14 19:44:38 +00:00
Matthew R. Kasun 0abba58bfb use string rather than []byte for dns 2022-03-14 14:59:41 -04:00
Matthew R. Kasun 0f7cbdac49 eliminate the need for a tmp file to update dns 2022-03-12 16:15:49 -05:00
0xdcarns 7eac05528a edited where server sets peers to account for ACLs 2022-03-11 08:59:53 -05:00
0xdcarns 12ca8e09aa update logs 2022-03-10 15:46:48 -05:00
Matthew R. Kasun 078be94fd2 don't update dns on comms network peer update 2022-03-08 17:15:13 -05:00
dcarns a6a4c8da1a
Merge pull request #877 from gravitl/hotfix_v0.11.0_wrong_error
change error
2022-03-08 07:50:35 -05:00
Matthew R. Kasun 63c87ade73 another one 2022-03-08 06:22:02 -05:00
Matthew R. Kasun b4fff48e9b change error 2022-03-08 06:02:50 -05:00
afeiszli 25224f72ee random ID for comms nodes 2022-03-07 20:33:03 -05:00
Matthew R. Kasun aa24037d28 fix stay paste error 2022-03-04 14:00:05 -05:00
Matthew R. Kasun 7722ba910b window tmp file path 2022-03-04 13:29:56 -05:00
Matthew R. Kasun cc5bc8f84d fix vscode autocompletion error 2022-03-04 11:10:52 -05:00
Matthew R. Kasun d7b0852e24 disable resolvctl dns 2022-03-03 15:07:27 -05:00
Matthew R. Kasun 9bd0af7e9c remove /etc/hosts entries if DONon=off ('no') 2022-03-02 09:07:52 -05:00
Matthew R. Kasun 72fd657116 add check for DNSOn 2022-03-02 07:54:15 -05:00
Matthew R. Kasun d596ec4753 hostctl for dns 2022-03-02 06:28:53 -05:00
Matthew R. Kasun 6c064cd4c6 ensure new listen port is written to config files and mq uses comms network 2022-02-22 22:34:08 -05:00
Matthew R. Kasun 8ab0f1a46c deleted debugging log messages 2022-02-22 18:13:27 -05:00
afeiszli 04d15d27af listenport logic 2022-02-22 17:50:41 -05:00
0xdcarns 26c70bb2f1 changed logs and saved private key 2022-02-21 15:38:46 -05:00
Matthew R Kasun c01b950ca9
Merge pull request #815 from gravitl/feature_v0.11.0_hublogic
fixed hub logic
2022-02-21 09:49:08 -05:00
afeiszli f21dad5184 fixed hub logic 2022-02-21 09:45:42 -05:00
0xdcarns 3596754734 bug fixes 2022-02-21 09:31:31 -05:00
afeiszli 5e8eab0a1e force leave for comms net 2022-02-20 18:09:32 -05:00
0xdcarns 595e00125b 1 2022-02-20 11:12:51 -05:00
0xdcarns ad155087b3 added os.kill 2022-02-20 10:13:27 -05:00
0xdcarns f1fa3dec0a client key update change 2022-02-20 10:08:42 -05:00
0xdcarns 086eb842be made node update with server more efficient 2022-02-20 09:38:28 -05:00
0xdcarns 5f7c94b304 cleaned up logs, go initial updates working 2022-02-19 10:45:25 -05:00
0xdcarns 7bf716429f fixed some bugs around join.. 2022-02-18 20:21:03 -05:00
0xdcarns 095f1002dd updated to run a daemon per different comms 2022-02-18 16:43:12 -05:00
Matthew R. Kasun 4cc293ee89 client logic for comms network 2022-02-18 16:27:54 -05:00
Matthew R. Kasun c7cf5fb2fb refactor to reduce number of goroutines 2022-02-18 14:56:26 -05:00
Matthew R. Kasun 52ac4c3bc3 refactor functions/dameon into multiple files; addressed code review comments 2022-02-18 11:34:18 -05:00
Matthew R. Kasun 2390f017be client logic for comms network 2022-02-18 10:34:03 -05:00
afeiszli be1763bb74 removing old node logic 2022-02-18 10:15:21 -05:00
0xdcarns 25c4d8ff1e fixes 2022-02-17 10:33:48 -05:00
0xdcarns 506a897f26 added ack and done signals 2022-02-17 09:08:20 -05:00
0xdcarns bd8b66c169 refactored clients 2022-02-16 22:27:20 -05:00
0xdcarns a622afc4c1 added logs and create node update 2022-02-16 21:35:15 -05:00
0xdcarns 407e46c117 began servside refactor 2022-02-16 20:44:17 -05:00
0xdcarns 867e253c3b refactored and cleaned up code, added peer update from clients 2022-02-16 20:44:15 -05:00
afeiszli a29ced1630 removing comment 2022-02-16 20:21:43 -05:00
afeiszli a33ff31a59 adding logic for nodes without wg-quick 2022-02-16 20:19:51 -05:00
Matthew R. Kasun e8a897f342 checkin logic updated 2022-02-15 15:40:38 -05:00
0xdcarns 83250980eb initial chunk approach 2022-02-15 10:15:17 -05:00
Matthew R. Kasun e1bba1d89f set macaddress and nodeid if not set 2022-02-15 10:12:39 -05:00
0xdcarns b6e3afa174 revert 2022-02-15 10:11:24 -05:00
0xdcarns d42ec811b8 first draft of chunks 2022-02-15 10:11:23 -05:00
0xdcarns d9a334b30c added initial pull to handle faster restarts 2022-02-12 13:04:44 -05:00
dcarns c2a93ef73a
Merge pull request #729 from chaychoong/fix-endpoint-typo
fix: endpoint typo
2022-02-10 08:38:55 -05:00
Chay Choong 2a9b422495
fix: endpoint typo 2022-02-10 17:54:03 +08:00
dcarns 0fe10360cc
Merge pull request #713 from gravitl/feature_v0.10.0_bsd_daemon
Feature v0.10.0 bsd daemon
2022-02-09 08:25:06 -05:00
Matthew R. Kasun 2f6439654a fix compile errors 2022-02-08 22:31:17 -05:00
Matthew R. Kasun a545643172 added freebsd daemon 2022-02-08 22:06:41 -05:00
afeiszli 6adca601d6 removing daemon restart on failure 2022-02-08 21:54:23 -05:00
afeiszli d4b15f0a2d adding force peer push every 5 min 2022-02-08 21:34:38 -05:00
afeiszli d5bae019b3 cleaning logs, fixing mac apply 2022-02-08 20:54:02 -05:00
0xdcarns 732665c3d4 cleaned up daemon and server mq 2022-02-08 19:13:58 -05:00
0xdcarns 06d3e847c3 changed mq client options 2022-02-08 17:04:03 -05:00
Matthew R. Kasun 1cd25a996c add ids to mqtt 2022-02-08 15:05:37 -05:00
0xdcarns 0b6dbb9e67 rebase fix 2022-02-08 13:57:18 -05:00
Matthew R. Kasun a4da05117e handler for KeyUpdate was missing a call to apply new wireguard conf 2022-02-08 13:55:52 -05:00
Matthew R. Kasun 3b7f4e31b1 remove go routines for handling reciept of subscribed messages 2022-02-08 13:13:43 -05:00
0xdcarns 39cea2da6c refactored delete, pull nil pointer and logging 2022-02-08 10:43:46 -05:00
dcarns a85a888251
Merge pull request #701 from gravitl/bugfix_v0.10.0_individual_serverkeepalive
publish individual server keepalive messages
2022-02-08 08:36:26 -05:00
Matthew R. Kasun 7e2928ba84 publish individual server keepalive messages 2022-02-08 08:33:44 -05:00
Matthew R. Kasun b8a0230c03 Added context and waitgroups to goroutines to enable complete shutdown of network go routines when a node is deleted.
Ensures a goroutine won't be updating files preventing their deletion.
2022-02-07 22:56:03 -05:00
afeiszli 22d9d4e88a add logging for file remove 2022-02-07 15:37:59 -05:00
Matthew R. Kasun c3189afc1a logging for tests 2022-02-07 15:18:28 -05:00
afeiszli 96535554f5 fixing mac stuff and dns testing 2022-02-07 11:38:47 -05:00
0xdcarns 8533f456bd edited so that if certain error detected, restart daemon, log changes 2022-02-06 15:02:05 -05:00
0xdcarns 4c5d21ec55 changed logging for server keepalive 2022-02-06 11:34:56 -05:00
Matthew R. Kasun bb20970902 restore pull on daemon start 2022-02-06 11:22:24 -05:00
0xdcarns 8ea0574be9 added cidr regardless 2022-02-06 11:06:04 -05:00
afeiszli 7bf864a387 fixing dns and various logs 2022-02-05 15:50:29 -05:00
dcarns 2ae4b1990a
Merge pull request #680 from gravitl/bugfix_v0.10.0_ping_and_retain_messages
Bugfix v0.10.0 ping and retain messages
2022-02-05 15:03:16 -05:00
0xdcarns 3713d1891a silenced logs 2022-02-05 15:00:26 -05:00
0xdcarns ac5eea4e3d began route consolidation 2022-02-05 13:31:06 -05:00
Matthew R. Kasun 44ee0e2e8a fix error messages 2022-02-04 18:24:46 -05:00
Matthew R. Kasun 6f0950792f set retained true on server publish and client ping server on checkin 2022-02-04 18:00:17 -05:00
0xdcarns 731977533b on delete, removes files and ends daemon if required, ifacedelta on key refresh 2022-02-04 16:47:57 -05:00
afeiszli 2cbf08ad1e adding logic for key checks, OS on server 2022-02-04 14:19:26 -05:00
0xdcarns 85c9d3575a added wipelocal on all leaves 2022-02-04 11:31:22 -05:00
afeiszli 9400209d97 adding OS and Version 2022-02-03 15:33:19 -05:00
Matthew R Kasun 4bcd52b85b remove debug log 2022-02-03 10:56:44 -05:00
Matthew R Kasun 19c476490a fix path in MessageQueue func 2022-02-03 10:48:40 -05:00
0xdcarns 11a094535f comment 2022-02-03 09:51:58 -05:00
0xdcarns 06e2603c20 added time to prevent UDP reset 2022-02-03 09:51:37 -05:00
afeiszli e336d62321 saving current logic 2022-02-03 09:51:37 -05:00
afeiszli eb6f33704a adding checks for DNS to ensure connectivity 2022-02-03 09:51:37 -05:00
afeiszli cbf709166c adding checks for DNS to ensure connectivity 2022-02-03 09:51:37 -05:00
afeiszli 239b9d36fc change queue identifier from server.ID to Network.NetID 2022-02-03 09:51:37 -05:00
0xdcarns f7258bf98f refactored some client leave & cache and server join logic 2022-02-03 09:51:37 -05:00
afeiszli 03a30b6bbc removing peer cache 2022-02-02 00:02:36 -05:00
afeiszli 7c4e8b2b4a removing peer cache 2022-02-01 23:30:10 -05:00
afeiszli 80dfdaa8fb removing UUID gen from client side 2022-02-01 22:36:02 -05:00
afeiszli f6c68bd209 removing UUID gen from client side 2022-02-01 22:01:30 -05:00
afeiszli c8154ffa5d remove GetNodeByIDOrMacAddress 2022-02-01 21:50:11 -05:00
afeiszli 44ee0102f8 add client pull loop + timeout 2022-02-01 16:05:39 -05:00
afeiszli d78edc36b9 add client pull loop + timeout 2022-02-01 15:46:42 -05:00
afeiszli 8e82bfa607 add client pull loop + timeout 2022-02-01 15:44:30 -05:00
afeiszli d2467e13f3 allow adding address 2022-02-01 15:27:00 -05:00
afeiszli eeb658595b set server node checkin 2022-02-01 14:37:00 -05:00
afeiszli d64cc1f39e publish peers on every keepalive 2022-02-01 14:01:13 -05:00
afeiszli 8c0341391c add logging to check for node publish 2022-02-01 11:31:19 -05:00
afeiszli bee8492c7a fixing permissions, logging on netclient 2022-02-01 11:04:57 -05:00
afeiszli 03c2f4e7ee fixing permissions, logging on netclient 2022-02-01 11:03:14 -05:00
afeiszli 1e5a0e9d04 fix server self updates 2022-01-31 23:18:58 -05:00
afeiszli 35884056b3 disable server deletion 2022-01-31 22:43:12 -05:00
afeiszli 973c5b052e change order of operations 2022-01-31 21:28:34 -05:00
afeiszli 33f327f245 fixing messages and keepalive 2022-01-31 17:21:31 -05:00
afeiszli 9614735dca fix peer sync 2022-01-31 16:49:40 -05:00
afeiszli 9d2ae79fe2 fix iface issues on client and access key deletion 2022-01-31 16:25:29 -05:00
afeiszli 6f9f97e4b7 dont publish to updated node 2022-01-31 16:15:10 -05:00
afeiszli 3964d927ea testing server update 2022-01-31 15:51:21 -05:00
afeiszli 09c2f9bf8b fixing peer locs 2022-01-31 15:37:57 -05:00
0xdcarns d5d442c75c removed go routines around mq 2022-01-31 14:09:23 -05:00
0xdcarns c621f6c2d6 sync always 2022-01-31 11:29:00 -05:00
0xdcarns 3aaf83d04d sync conf 2022-01-31 11:25:05 -05:00
0xdcarns 4823566125 debug again 2022-01-31 11:20:59 -05:00
Matthew R Kasun e8bbd8790e add serverkeepalive to Resubcribe 2022-01-30 18:38:15 -05:00
Matthew R Kasun c0a085a53f fix sending keepalives; fix where keepalive timestamps stored 2022-01-30 14:50:18 -05:00
Matthew R Kasun 34069302f3 use map to store last server keepalive time 2022-01-30 10:37:35 -05:00
Matthew R Kasun 7ac0bfd13a Merge remote-tracking branch 'origin/develop' into feature_v0.10.0_serverPings 2022-01-30 09:18:24 -05:00
Matthew R Kasun 20569ee8ec Merge remote-tracking branch 'origin/develop' into feature_v0.10.0_serverPings 2022-01-30 05:55:52 -05:00
0xdcarns 410efbab50 switched to eliptical strategy 2022-01-29 18:18:46 -05:00
0xdcarns 2d703dce7c refactored continue 2022-01-29 18:18:46 -05:00