Commit graph

98 commits

Author SHA1 Message Date
Max Ma
5740c3e009
Net 1115 (#2890)
* add endpointipv6 for host

* keep endpointipv6 unchanged when enable static endpoint

* handle ipv6 endpoint updates

---------

Co-authored-by: abhishek9686 <abhi281342@gmail.com>
2024-04-11 17:37:45 +05:30
abhishek9686
c25a732015 fix acl mutex lock 2024-03-04 13:11:51 +07:00
abhishek9686
0dae81438f add debug logs to removing host from network 2024-03-04 12:38:21 +07:00
abhishek9686
1b4eb1b768 add debug logs to removing host from network 2024-03-04 12:25:44 +07:00
Abhishek K
7e3bf3baea
NET-812: Deprecate Setting /etc/hosts entries (#2733)
* deprecate setting etc host dns entries, set coredns entries at neccessary places

* remove dns mq topics

* only set dns when set on

* add extcleints dns entries to coredns

* fix static checks

* run coredns with host network mode

* add bind address to coredns container
2023-12-20 10:24:53 +04:00
Abhishek K
98c01c4325
NET-814: Deprecating TURN (#2723)
* deprecate turn

* process signals through mq
2023-12-13 22:46:57 +04:00
Abhishek K
2c4a27c53b
NET-735: HA Support (#2701)
* cache enabled option, cache hosts data if only enabled

* cache nodes only when enabled

* cache extclients only when enabled

* cache acls only when enabled
2023-12-05 12:01:35 +04:00
Abhishek K
b78cc0a8a1
NET-725: Failovers (#2685)
* api to  to get host relayed from client

* add auto relay to api host

* add peer nat type

* set pro field on signal

* rm net check on relay me handler

* return success response

* re-establish failover logic

* set failOver ctx

* failOver with peer pub key

* failovered peer updates

* failover handlers, reset failovered peer on deletion

* rm unused funcs

* initialize failover handler on EE

* ignore failover node on signal

* failover changes

* set host id on signal

* extend signal model to include node ids

* add backwards compatibility

* add failover as node api

* set json response on failover handers

* add failover field to api node

* fix signal data check

* initialize failover peer map

* reset failovered status when relayed or deleted

* add failover info to api node

* reset network failover

* only proceed furtuer if failover exists in the network

* set failOver node defaults

* cannot set failover node as relayed

* debug log

* debug log

* debug changes

* debug changes

* debug changes

* revert debug changes

* don't add peers to idmap when removed

* reset failed Over

* fix static checks

* rm debug log

* add check for linux host
2023-11-29 20:10:07 +04:00
Abhishek K
7a9dc3458f
NET-667: force delete daemon node (#2645)
* force delete zombie node

* return correct resp

* fix zombie hosts processing

* add nil check rather checking error

* pr comments
2023-10-31 14:34:28 +04:00
Abhishek K
675c4ec34c
NET-641: Enable/Disable Auto Update From UI (#2622)
* add support to disable/enable autoupdate on a host

* setting to older version for QA to test
2023-10-19 08:59:36 +04:00
Gabriel de Souza Seibel
cb4b99ffcb
[NET-562] Persistent Keep Alive from node to host (#2604)
* Move PKA field from models node to host level

* Move PKA field from api models node to host level

* Adapt logic package to node->host PKA

* Adapt migration-related code to node->host PKA

* Adapt cli code to node->host PKA

* Change host PKA default to 20s

* On IfaceDelta, check for PKA on host

* On handleHostRegister, set default PKA

* Use a default PKA

* Use int64 for api host pka

* Reorder imports

* Don't use host pka in iface delta

* Fix ConvertAPIHostToNMHost

* Add swagger doc for host PKA field

* Fix swagger.yml

* Set default PKA only for new hosts

* Remove TODO comment

* Remove redundant check

* Have api-host pka be specified in seconds
2023-10-06 10:09:19 +04:00
Abhishek K
3f1211795c
NET-383: Set Additional Host Fields From Client Side (#2566)
* update static,mtu from client side host update

* update host fields if host exists already on registration
2023-10-02 19:36:31 +04:00
Gabriel de Souza Seibel
1a1ba1ccf4
[NET-546] Move ee code to ee package, unify ee status and terminology (#2538)
* Move ee code to ee package and unify ee status to IsPro

* Consolidate naming for paid/professional/enterprise version as "pro". Notes:

- Changes image tags
- Changes build tags
- Changes package names
- Doesn't change links to docs that mention "ee"
- Doesn't change parameters sent to PostHog that mention "ee"

* Revert docker image tag being -pro, back to -ee

* Revert go build tag being pro, back to ee

* Add build tags for some ee content

* [2] Revert go build tag being pro, back to ee

* Fix test workflow

* Add a json tag to be backwards compatible with frontend "IsEE" check

* Add a json tag for the serverconfig struct for IsEE

* Ammend json tag to Is_EE

* fix ee tags

---------

Co-authored-by: Abhishek Kondur <abhi281342@gmail.com>
2023-09-01 07:42:05 +05:30
Gabriel de Souza Seibel
8ce7da2ce9
[NET-494 / ACC-322] New free tier limits (#2495)
* Rename var

* Rename consts and use iota

* Use switch instead of repeated else if

* Rename limits related vars

* Introduce new free tier limits

* Measure new limits and report on license validation

* Separate usage and limits, have new ones

* Don't check for hosts and clients limits, but for machines instead

* Error on egress creation @ free tier w/ internet gateways

* Remove clients and hosts limit from code

* Rename var

* Rename consts and use iota

* Use switch instead of repeated else if

* Rename limits related vars

* Introduce new free tier limits

* Measure new limits and report on license validation

* Separate usage and limits, have new ones

* Don't check for hosts and clients limits, but for machines instead

* Error on egress creation @ free tier w/ internet gateways

* Remove clients and hosts limit from code
2023-08-08 23:17:49 +05:30
Aceix
91859c2490
prune(NET-483): remove defunct host.internetgateway field (#2487) 2023-08-02 17:26:44 +05:30
Abhishek K
645bc4c126
NET-447: Removed proxy related fields and code (#2459)
* remove related fields and code

* remover metrics collection from server code

* fw update struct

* add ext client flag to metrics data

* simply nat types

* rm proxy update from cli
2023-07-26 11:22:49 +05:30
Aceix
f4a5520f86
Kwesi/net 326 bug client ac ls (#2462)
* feat(NET-326): return 200 [] instead of 500 when there are not network acls

* fix(NET-326): implement allow/deny client acl functions

* fix(NET-326): implement extclient acl update

* fix(NET-326): kame fixes, send peer updates
2023-07-26 10:32:54 +05:30
Aceix
68b8d7f600
fix(NET-117): force delete hosts and assoc nodes (#2432) 2023-07-10 10:03:59 +00:00
Alex Feiszli
ae92499a32
Merge pull request #2427 from gravitl/NET-390-acl-panic-fix
NET-390: acl panic fix, DB cache
2023-06-28 13:59:05 -04:00
Abhishek Kondur
b64cef3447 fix merge conflicts 2023-06-28 22:12:30 +05:30
Abhishek K
230e062c84
GRA-1298: License check changes, free tier limits for saas (#2418)
* set free tier limits through config

* add host limit to config

* check for host limit on free tier

* fix license validation, replace node limit with hosts

* add hosts to telemetry data

* debug init

* validate license every 1hr

* hook manager, api to fetch server usage

* hook manager, server usage api

* encode json server usage api

* update ngork url

* update license validation endpoint

* avoid setting limits on eer

* adding hotfix

* correct users limits env var

* add comments to exported funcs

---------

Co-authored-by: afeiszli <alex.feiszli@gmail.com>
2023-06-28 20:33:06 +05:30
Abhishek Kondur
243cc74490 remove endpoint detection from host model 2023-06-27 22:36:24 +05:30
Abhishek Kondur
27ac920069 cache acls 2023-06-27 16:12:06 +05:30
Abhishek Kondur
307203105d unexport cache funcs 2023-06-27 16:10:44 +05:30
Abhishek Kondur
4071bb2bac db cache nodes and hosts 2023-06-27 16:10:04 +05:30
Tobias Cudnik
94ca72e370
NET-173 Sync EndpointDetection config (#2374)
* adding serverconfig logic and variable to hosts

* - sync EndpointDetection on peerupdate
- add EndpointDetection to env config

* - endpoint detection always comes from the server
- fixed ENDPOINT_DETECTION -> NETCLIENT_ENDPOINT_DETECTION

---------

Co-authored-by: afeiszli <alex.feiszli@gmail.com>
2023-06-13 16:33:53 -04:00
Abhishek K
47edf65b1f
NET-186: Wg public listen port (#2344)
* fetch public listen of wg if present

* check if wg pub listen port has been changed on host update

* wg public port to host api model for visibility

* rm comment
2023-05-31 08:21:02 +05:30
Abhishek Kondur
64c0c861f4 check for use turn config 2023-04-28 14:14:24 +05:30
Abhishek Kondur
423abf0fe4 add use_turn option to config,check if server is using turn 2023-04-28 14:06:28 +05:30
Abhishek Kondur
9e0038f39c merge conflicts resolved 2023-04-25 11:12:22 +04:00
Matthew R Kasun
c510846444
Merge branch 'develop' into GRA-1529-key-update 2023-04-19 13:16:09 -04:00
dcarns
700147e3ca
Merge pull request #2171 from walkerwmanuel/GRA-1336-sort-before-sending
GRA-1336: sort before sending
2023-04-19 13:08:08 -04:00
Matthew R Kasun
754ab44a48 Merge remote-tracking branch 'origin/develop' into GRA-1529-key-update 2023-04-19 09:48:04 -04:00
dcarns
3d82df3bc6
Merge pull request #2133 from gravitl/refactor_auto_update
Add host level auto update setting with default true
2023-04-19 09:40:56 -04:00
Abhishek Kondur
b4cfaafbec register host with turn on creation 2023-04-19 08:04:49 +04:00
Matthew R Kasun
cd89b4abef remove old peer when publickey updated 2023-04-17 18:20:09 -04:00
Abhishek Kondur
4f95e9f562 add basic auth to turn server apis, handle host registration on server 2023-04-17 15:33:05 +04:00
Abhishek Kondur
d4ceabd4b3 register host through server, add basic auth to turn apis 2023-04-17 11:21:28 +04:00
Abhishek Kondur
f54ae9ae8f turnserver registration apis 2023-04-06 08:50:34 +04:00
Abhishek Kondur
d96360565b api handlers to register and unregister host from turn,added dockerfile 2023-04-05 13:02:14 +04:00
Abhishek Kondur
b8904d1f3c Merge branch 'develop' of https://github.com/gravitl/netmaker into GRA-1494 2023-04-04 18:32:55 +04:00
walkerwmanuel
9e56135424 Added user sorting and fixed error 2023-04-03 14:36:38 -04:00
0xdcarns
2da7d7242f remove debug items 2023-03-30 17:33:55 -04:00
0xdcarns
fa40a5929d added turn ep + nat type to host model 2023-03-30 17:23:21 -04:00
walkerwmanuel
09872e9ec5 added sort logic 2023-03-30 16:04:12 -04:00
Abhishek Kondur
cafdfa70c1 turn server poc 2023-03-22 11:00:03 +04:00
Anish Mukherjee
4405038d67 add server setting for auto update 2023-03-20 18:10:52 +05:30
Anish Mukherjee
6b684d95a4 add host auto updated setting with default true 2023-03-20 17:47:41 +05:30
Matthew R Kasun
b3cfbe7266 default proxy mode 2023-03-13 14:39:13 -04:00
0xdcarns
ee9df20b05 changed register response, simplified host port check dereference 2023-03-10 11:43:26 -05:00