Commit graph

65 commits

Author SHA1 Message Date
Abhishek K
ca95954fb5
NET-2000: Api access tokens (#3418)
* feat: api access tokens

* revoke all user tokens

* redefine access token api routes, add auto egress option to enrollment keys

* fix revoked tokens to be unauthorized

* remove unused functions

* convert access token to sql schema

* switch access token to sql schema

* revoke token generated by an user

* add user token creation restriction by user role

* add forbidden check for access token creation

* revoke user token when group or role is changed

* add default group to admin users on update

* fix token removal on user update

* fix token removal on user update
2025-04-23 20:21:42 +04:00
Abhishek K
e13bf2c0eb
NET-1923: Add Metric Port to server config (#3306)
* set default metrics port 8889

* set default metrics port 51821

* add metrics port to server config

* bind caddy only on tcp

* add var for pulling files

* add new line

* update peer update model

* check if port is not zero

* set replace peer to false on pull

* do not replace peers on failover sync

* remove debug log

* add old peer update fields for backwards compatibility

* add old json tag

* add debug log in caller trace func
2025-02-04 08:44:24 +04:00
Abhishek K
31c2311bef
NET-1782: Fetch Node Connection Status from metrics (#3237)
* add live status of node

* handle static node status

* add public IP field to server configuration

* get public Ip from config

* improve node status logic

* improvise status check

* use only checkin status on old nodes

---------

Co-authored-by: the_aceix <aceixsmartx@gmail.com>
2024-12-10 10:46:05 +04:00
loselarry
fa32c2ac58
chore: fix function names in comment (#2888)
Signed-off-by: loselarry <bikangning@yeah.net>
2024-04-11 21:04:24 +05:30
Abhishek Kondur
358bd12297 send peer update for extclient extraAllowedIps update 2023-11-27 10:03:21 +04:00
Matthew R Kasun
6d6ba3aa7d random string
update algorithm
consolidate MakeRandomString, RandomString & GenerateCrytoString into
one function
2023-05-02 13:28:00 -04:00
Matthew R Kasun
77cfae41ff remove postup/down 2023-02-02 11:16:54 -05:00
Anish Mukherjee
131f70b2a4 fix address range check 2023-01-25 16:01:46 +05:30
0xdcarns
706bba0593 addressed majority of static checks 2023-01-24 11:20:06 -05:00
0xdcarns
5f5f8be5d5 created functions 2022-12-23 12:38:22 -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
Abhishek Kondur
acd7a70b77 PR comments resolved 2022-10-01 06:27:30 +05:30
Abhishek Kondur
0df6d1761e add subscription pattern to acls,fix NaN value in metrics for uptime,get real iface name for mac 2022-09-30 18:31:57 +05:30
0xdcarns
88cd0a6497 initial commit 2022-09-13 15:25:56 -04:00
Matthew R. Kasun
b61c4d1068 address code review comments 2022-09-09 13:15:37 -04:00
Matthew R. Kasun
ce58eed740 fix merge conflict 2022-09-07 14:11:56 -04:00
Matthew R Kasun
d8bcf33701
Merge branch 'develop' into feature_v0.15.1_normalize_networks 2022-09-07 06:57:14 -04:00
Matthew R. Kasun
2d87d14da4 networkaddress vice firstaddress 2022-09-06 09:17:13 -04:00
Matthew R. Kasun
6b42cbe120 normalize cidr on network/egress gateway creation 2022-09-03 08:55:49 -04:00
Matthew R. Kasun
ea3a1933e1 add ip6table rules for gateways 2022-09-01 08:10:49 -04:00
Matthew R Kasun
34263a6e2f refactor peer calculations 2022-06-14 14:36:30 +00:00
afeiszli
9e00a00bda GetPeers comments 2022-05-31 16:11:58 -04:00
0xdcarns
2de7beb31e added nil checks, handled empty map 2022-05-11 12:07:06 -04:00
0xdcarns
e7f9310b3d added length checks as temp solution 2022-05-10 15:18:29 -04:00
afeiszli
ccc0ed851d adding local listen port 2022-04-25 11:34:32 -04:00
Matthew R. Kasun
7d2aa4fc82 add network to peer 2022-03-14 15:56:01 -04:00
0xdcarns
aefc8b090b added basic api endpoints 2022-03-10 14:55:40 -05:00
afeiszli
33df27a721 fixed hub logic 2022-02-21 11:08:45 -05:00
afeiszli
1c06cfc8f7 modified getpeers for hub network 2022-02-18 11:43:49 -05:00
0xdcarns
9bee126429 hotfix 2 2022-02-15 21:50:47 -05:00
0xdcarns
456272d549 fixed issue with delete 2022-02-08 11:01:44 -05:00
afeiszli
7c4e8b2b4a removing peer cache 2022-02-01 23:30:10 -05:00
afeiszli
c6252764e8 fix peer sync 2022-01-31 17:13:19 -05:00
0xdcarns
2430eb0a47 prevent nodes from changing address out of range or to .0 or .255 addresses 2022-01-19 10:47:23 -05:00
0xdcarns
134a09670f refactor 2022-01-18 10:55:02 -05:00
0xdcarns
916866f73c began refactor 2022-01-17 18:35:16 -05:00
0xdcarns
2fe8025afa Cover a legacy case, allow server to run with uuids 2022-01-17 14:22:39 -05:00
0xdcarns
0502ff131c adapted node routes further to new id 2022-01-17 14:21:40 -05:00
0xdcarns
96aec541e3 updated routes to use uuid 2022-01-17 14:21:40 -05:00
0xdcarns
52195cd040 updated routes to use uuid 2022-01-17 14:21:40 -05:00
0xdcarns
ec8d9baa29 added hotfixes 2022-01-17 14:21:40 -05:00
0xdcarns
545f45d86d refactored more 2022-01-17 14:21:40 -05:00
0xdcarns
64e7791011 restructuring continued 2022-01-17 14:21:40 -05:00
0xdcarns
c033be41bb began transition 2022-01-17 14:21:40 -05:00
afeiszli
1081e63cc1 fixing egress on relay 2022-01-04 13:54:03 -05:00
afeiszli
1c9cb819dc adding egress to relay 2022-01-04 13:45:18 -05:00
0xdcarns
dcaba24b11 added egress relayed addrs to relayed nodes 2022-01-03 11:30:02 -05:00
0xdcarns
c2460c576e nil pointers, update version 2021-12-11 12:07:54 -05:00
0xdcarns
548997f9ef optimize further 2021-12-10 21:09:42 -05:00