Commit Graph

172 Commits

Author SHA1 Message Date
Abhishek Kondur
b6b71c951e add extclient extra allowedIPs and attach them to egress routes 2023-11-24 18:32:43 +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
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
Matthew R Kasun
5c38b5b2d0 migration (#2509)
* create gateways during migration

* set version for testing

* restruct migration

* debug logging

* enforce unique names for ext client names (#2476)

* enforce unique names for ext client names

* only check for unique id on creation

* check for unique id if changed

* prune(NET-483): remove defunct host.internetgateway field (#2487)

* don't reference host on err (#2493)

* deprecrate netclient install scripts (#2490)

* Net 500: validate network parameter passed to node endpoints (#2480)

* enforce unique names for ext client names

* only check for unique id on creation

* check for unique id if changed

* validate network parameter passed to node endpoints

---------

Co-authored-by: Abhishek K <32607604+abhishek9686@users.noreply.github.com>

* NET-513 (#2492)

nm-certs.sh now requests certificate for EE and CE edition domains accordingly.

* [NET-404] Run in limited mode when ee checks fail (#2474)

* Add limited http handlers functionality to rest handler

* Export ee.errValidation (ee.ErrValidation)

* Export a fatal error handled by the hook manager

* Export a new status variable for unlicensed server

* Mark server as unlicensed when ee checks fail

* Handle license validation failures with a (re)boot in a limited state

* Revert "Export a fatal error handled by the hook manager"

This reverts commit 069c21974a8d36e889c73ad78023448d787d62a5.

* Revert "Export ee.errValidation (ee.ErrValidation)"

This reverts commit 59dbab8c79773ca5d879f28cbaf53f3dd4297b9b.

* Revert "Add limited http handlers functionality to rest handler"

This reverts commit e2f1f28facaca54713db76a588839cd2733cf673.

* Revert "Handle license validation failures with a (re)boot in a limited state"

This reverts commit 58cfbbaf522a1345aac1fa67964ebff0a6d60cd8.

* Revert "Mark server as unlicensed when ee checks fail"

This reverts commit 77c6dbdd3c9cfa6e7d6becedef6251e8617ae367.

* Handle license validation failures with a middleware

* Forbid responses if unlicensed ee and not in status api

* Remove unused func

* feat(NET-449): add sync feature to request a host pull from server (#2491)

* fix(NET-486): change client name length validation (#2498)

set limit to 5<=x<=32

* [NET-477] Pick AMB URL dynamically (#2489)

* Introduce config for environment

* Introduce func to get environment

* Choose accounts api host from environment

* Test the ee package on workflows

* Use build tag ee for license_test.go

* [Feature]: nm-quick script tackling arm TODO support (#2488)

* domain flag for auto installs

* use static servers with custom domain (#2421)

* send delete peer update always

* fix add/remove host api calls

* keep mq updates in a single go func

* move branch test logic to devops (#2443)

* handle IOT OS

* save server name to env (#2460)

* ensure branch test servers available after test runs (#2467)

* save server name to env

* free server always; add PR to discord messages

* use correct method to delete droplets (#2468)

* quick fix for the launcher

* removed exit when triggering not supported exit and removed the TODO comments related to this issue

---------

Co-authored-by: Matthew R Kasun <mkasun@nusak.ca>
Co-authored-by: Alex Feiszli <31018251+afeiszli@users.noreply.github.com>
Co-authored-by: Christopher Blaha <crispspiceguitar@gmail.com>
Co-authored-by: Abhishek Kondur <abhi281342@gmail.com>
Co-authored-by: Abhishek K <32607604+abhishek9686@users.noreply.github.com>

* rebase conflict

* include pass and os in mirgration data

* node network ranges

* remove debugging logs

* add gateways

* use sent node

* upgrade shell script

* associate node to host during migration

* add node to host.Nodes and publish peer update

* save host outside loop

* fix script name

* simplify upgrade script

* don't migrate relays

* simplify upgrade script even more

* guard against blank address or address6

* typos

---------

Co-authored-by: Aceix <aceixsmartX@gmail.com>
Co-authored-by: Abhishek K <32607604+abhishek9686@users.noreply.github.com>
Co-authored-by: Farukh Khan <farukhkhan21@gmail.com>
Co-authored-by: Gabriel de Souza Seibel <gabrielseibel1@gmail.com>
Co-authored-by: bornav <51048565+bornav@users.noreply.github.com>
Co-authored-by: Alex Feiszli <31018251+afeiszli@users.noreply.github.com>
Co-authored-by: Christopher Blaha <crispspiceguitar@gmail.com>
Co-authored-by: Abhishek Kondur <abhi281342@gmail.com>
2023-08-14 23:14:10 +05:30
Farukh Khan
a9a8596d71 NET-507 (#2506)
* NET-507

* Fixed server restart changing the node expiration date to the defaults.

* Removed expired nodes removal from zombie cleanup routine.

* Added a new expired nodes deletion routine which removes expired nodes every hour.

* NET-507 suggested changes

* Possible fix for zombie nodes upon node deletion from the UI.

* Suggested changes implemented for expired nodes deletion go routine.

* NET-507 typo fix

* typo fix for DeleteNode purge parameter
2023-08-10 20:27:44 +05:30
Aceix
91859c2490 prune(NET-483): remove defunct host.internetgateway field (#2487) 2023-08-02 17:26:44 +05:30
Aceix
a7914b1631 fix(NET-388): fix to update node dns toggle (#2472) 2023-07-28 21:28:36 +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
Abhishek K
38454ece79 IOT-66: Single Peer update for IOT client (#2424)
* send peer update to IOT client only when it is relayed

* move node check

* send relay del update for iot client

* fix relay delete logic for iot

* set relay node to true for iot peer update

* add node addrs to peer update

* revert tag
2023-06-28 22:08:49 +05:30
Abhishek K
6c2582651c Net-137: Node relays (#2401)
* revert relays

* initial relay commit

* get relayed allowed ips

* add more relay validation checks, peer logic cleanup

* rm relayed nodes from relay node when relayed node is deleted

* fix egress updates for relayed nodes

* rm unused func

* remove  debug logs

* avoid adding egress ranges on the relayed gw node

---------

Co-authored-by: Matthew R Kasun <mkasun@nusak.ca>
2023-06-19 12:26:14 -04:00
Matthew R Kasun
78640f1342 Extclient NET-63x (#2286)
* model changes

* additional fields for extclient create

* add DNS to extclient config

* extclient name checks

* update extclient

* nmctl extclient

* final tweaks

* review comments

* add extclientdns to node on ingress creation

* fix to add ingress dns to api (#2296)

---------

Co-authored-by: Aceix <aceixsmartX@gmail.com>
2023-05-17 10:58:03 -04:00
Matthew R Kasun
63552891ee refactor key updates on host basis vice node 2023-04-13 15:02:14 -04:00
Matthew R Kasun
828b3f7162 remove local network/range 2023-02-26 16:28:16 -05:00
Abhishek Kondur
7be2771ea8 comments for exported 2023-02-06 20:18:11 +04:00
Abhishek Kondur
b695f6e288 Merge branch 'develop' of https://github.com/gravitl/netmaker into GRA-1054/egress_route_manager 2023-02-06 20:01:33 +04:00
Abhishek Kondur
6a3fcaf664 add egress gw ranges to common node model 2023-02-04 16:24:46 +04:00
Abhishek Kondur
92922f17bd update network model 2023-02-04 10:13:16 +04:00
Matthew R Kasun
77cfae41ff remove postup/down 2023-02-02 11:16:54 -05:00
0xdcarns
f034c74838 fixed default expiration date setting and removed unused func 2023-02-01 11:21:30 -05:00
Abhishek Kondur
73386e8f2e set node defaults 2023-01-24 12:37:12 +04:00
Abhishek Kondur
63f18f539e GRA-985: rm locallistenport, added proxy public listen port field 2023-01-20 06:26:08 -05:00
Matthew R Kasun
9edb541388 remove localrange 2023-01-20 05:42:05 -05:00
Abhishek Kondur
c077e3d1c1 GRA-985: rm locallistenport, added proxy public listen port field 2023-01-18 02:03:19 +05:30
Abhishek Kondur
ca3d9dc40b fix node update 2023-01-06 16:58:41 +05:30
Abhishek Kondur
9f0ef1628c node update fix, nil pointer errors fix 2023-01-06 00:29:55 +05:30
Abhishek Kondur
bff68bd945 rm peers from node model 2023-01-05 14:56:20 +05:30
Abhishek Kondur
2ff8684fd4 keep node level peers for now 2023-01-05 09:42:41 +05:30
Abhishek Kondur
72e4b914b9 move peers to host level 2023-01-05 09:24:46 +05:30
Abhishek Kondur
d99526fd54 peer update for host 2023-01-04 10:04:17 +05:30
Matthew R Kasun
a371b7ae21 Merge branch 'netclient_refactor_latest' into GRA-824-getPeerUpdate 2022-12-23 15:59:55 -05:00
0xdcarns
368d01ff10 removed localaddress 2022-12-23 14:06:39 -05:00
Matthew R. Kasun
eae92470c5 refactor of peerUpdate
contains some debugging logging
2022-12-23 13:41:17 -05:00
0xdcarns
e92f524fbe finished convert api to nm node 2022-12-21 11:56:29 -05:00
Matthew R. Kasun
716dc3def5 update validations for boolean attributes 2022-12-21 06:29:05 -05:00
Matthew R. Kasun
0272e88c0f fix panic joining non-dual stack network 2022-12-21 05:58:52 -05:00
Matthew R. Kasun
770a293049 new constant for wireguard interface name 2022-12-21 03:31:37 -05:00
Matthew R. Kasun
38cd4d7700 refactor join
also removes server node
suspect there may be issues with proxy
and UI interactions with nodes
2022-12-20 15:29:09 -05:00
Matthew R. Kasun
c086e9499d rebase
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-12-19 15:15:35 -05:00
Matthew R Kasun
55f7a0eb02 Merge pull request #1828 from gravitl/story/GRA-752
fix(GRA-752f): add address string to be sent to frontend
2022-12-16 07:42:07 -05:00
Aceix
457060d41a fix(GRA-752f): add address string to be sent to frontend 2022-12-14 11:39:33 +00:00
Abhishek Kondur
759b9bc6cd rm ext cidr 2022-12-13 01:14:28 +05:30
Abhishek Kondur
8fc09fd5cd fix stun port format,use proxy listen port from node model 2022-12-12 10:33:35 +05:30
Abhishek Kondur
0b8257f0d7 fix models change, merge conflicts resolved 2022-12-12 08:50:28 +05:30
Matthew R. Kasun
99cf813753 fix yaml tag for HostID 2022-12-09 13:25:24 -05:00
Abhishek Kondur
d8075e69c6 add alias internal ip to ext clients 2022-12-08 19:48:47 +05:30
Abhishek Kondur
695e3b1661 merge conflicts resolved 2022-12-08 09:28:41 +05:30
Abhishek Kondur
80c7d46ec6 docker compose update, add stun to caddyfile 2022-12-06 19:27:38 +05:30
Abhishek Kondur
4b1a85a3ee proxy changes 2022-12-02 17:35:41 +05:30
Abhishek Kondur
5b7ead91e6 merge conflicts resolved 2022-12-02 10:08:01 +05:30
Matthew R. Kasun
c5919b347c local interfaces 2022-11-28 12:58:24 -05:00