Commit Graph

1720 Commits

Author SHA1 Message Date
1f48fdf6ca Add SavePeer method to prevent a possible account inconsistency (#2296)
SyncPeer was storing the account with a simple read lock

This change introduces the SavePeer method to the store to be used in these cases
2024-07-26 07:49:05 +02:00
45fd1e9c21 add save peer status test for connected peers (#2321) 2024-07-25 16:22:04 +02:00
63aeeb834d Fix error handling (#2316) 2024-07-24 13:27:01 +02:00
b7fcd0d753 Remove UpdatePeerSSHKey method 2024-07-23 21:16:25 +03:00
268e801ec5 Ignore network monitor checks for software interfaces (#2302)
ignore checks for Teredo and ISATAP interfaces
v0.28.6
2024-07-22 19:44:15 +02:00
788f130941 Retry management connection only on context canceled (#2301) 2024-07-22 15:49:25 +02:00
926e11b086 Remove default allow for UDP on unmatched packet (#2300)
This fixes an issue where UDP rules were ineffective for userspace clients (Windows/macOS)
2024-07-22 15:35:17 +02:00
a19c2f660c Merge branch 'refs/heads/feature/optimize-network-map-updates' into feature/validate-group-association 2024-07-22 15:24:30 +03:00
936215b395 Optimize account peers updates on route changes 2024-07-22 13:51:18 +03:00
bb08adcbac Remove condition check for network serial update 2024-07-20 20:36:36 +03:00
f5ec234f09 Optimize peer update on user deletion and changes 2024-07-20 20:08:29 +03:00
26f089e30d Refactor peer account updates for efficiency 2024-07-20 12:37:25 +03:00
0a8c78deb1 Minor fix local dns search domain (#2287) 2024-07-19 16:44:12 +02:00
713c0341be Optimize update of account peers on jwt groups sync 2024-07-19 14:09:33 +03:00
1bbd8ae4b0 Optimize account peers update in DNS settings 2024-07-19 10:51:20 +03:00
a723c424f0 Refactor group changes 2024-07-19 10:51:05 +03:00
3e76deaa87 Update account peers if ns group has peers 2024-07-18 21:04:58 +03:00
36d4c21671 Optimize group change effects on account peers 2024-07-18 20:37:29 +03:00
181e8648a8 Refactor group management 2024-07-18 19:59:37 +03:00
1012c2f990 Add HasPeers function to group 2024-07-18 19:59:14 +03:00
c815ad86fd Fix macOS DNS unclean shutdown restore call on startup (#2286)
previously, we called the restore method from the startup when there was an unclean shutdown. But it never had the state keys to clean since they are stored in memory

this change addresses the issue by falling back to default values when restoring the host's DNS
v0.28.5
2024-07-18 18:06:09 +02:00
ef1a39cb01 Refactor macOS system DNS configuration (#2284)
On macOS use the recommended settings for providing split DNS. As per
the docs an empty string will force the configuration to be the default.
In order to to support split DNS an additional service config is added
for the local server and search domain settings.

see: https://developer.apple.com/documentation/devicemanagement/vpn/dns
2024-07-18 16:39:41 +02:00
1b28d1dfbc Refactor group link checking into re-usable functions 2024-07-18 16:41:21 +03:00
f17016b5e5 Skip peer update on unchanged network map (#2236)
* Enhance network updates by skipping unchanged messages

Optimizes the network update process
by skipping updates where no changes in the peer update message received.

* Add unit tests

* add locks

* Improve concurrency and update peer message handling

* Refactor account manager network update tests

* fix test

* Fix inverted network map update condition

* Add default group and policy to test data

* Run peer updates in a separate goroutine

* Refactor

* Refactor lock
2024-07-18 13:50:44 +03:00
c900fa81bb Remove copy functions from signal (#2285)
remove migration function for wiretrustee directories to netbird
2024-07-18 12:15:14 +02:00
9a6de52dd0 Check if route interface is a Microsoft ISATAP device (#2282)
check if the nexthop interfaces are Microsoft ISATAP devices and ignore their suffixes when comparing them
2024-07-17 23:49:09 +02:00
19147f518e Add faster availability DNS probe and update test domain to .com (#2280)
* Add faster availability DNS probe and update test domain to .com

- Count success queries and compare it before doing after network map probes.

- Reduce the first dns probe to 500ms

- Updated test domain with com instead of . due to Palo alto DNS proxy server issues

* use fqdn

* Update client/internal/dns/upstream.go

Co-authored-by: Viktor Liu <17948409+lixmal@users.noreply.github.com>

---------

Co-authored-by: Viktor Liu <17948409+lixmal@users.noreply.github.com>
2024-07-17 23:48:37 +02:00
e78ec2e985 Don't add exclusion routes for IPs that are part of connected networks (#2258)
This prevents arp/ndp issues on macOS leading to unreachability of that IP.
2024-07-17 19:50:06 +02:00
95d725f2c1 Wait on daemon down (#2279) 2024-07-17 16:26:06 +02:00
4fad0e521f Support custom SSL certificates for the signal service (#2257) 2024-07-16 20:44:21 +02:00
a711e116a3 fix: save peer status correctly in sqlstore (#2262)
* fix: save peer status correctly in sqlstore

https://github.com/netbirdio/netbird/issues/2110#issuecomment-2162768273

* feat: update test function

* refactor: simplify status update
2024-07-16 18:38:12 +03:00
b6cef2ce2c Remove account peers update on saving setup key 2024-07-16 18:30:47 +03:00
dedf13d8f1 Update account peer if posture check is linked to policy 2024-07-16 18:19:05 +03:00
668d229b67 Fix metric label typo (#2278) 2024-07-16 16:55:57 +02:00
d676c41c74 Remove incrementing network serial and updating peers after group deletion 2024-07-16 16:50:44 +03:00
7c595e8493 Add get_registration_delay_milliseconds metric (#2275) 2024-07-16 15:36:51 +02:00
f9c59a7131 Refactor log util (#2276) 2024-07-16 11:50:35 +02:00
1d6f5482dd feat(client): send logs to syslog (#2259) 2024-07-16 10:19:58 +02:00
12ff93ba72 Ignore no unique route updates (#2266) 2024-07-16 10:19:01 +02:00
88d1c5a0fd fix forwarded metrics (#2273) 2024-07-16 10:14:30 +02:00
1537b0f5e7 Add batch save/update for groups and users (#2245)
* Add functionality to update multiple users

* Remove SaveUsers from DefaultAccountManager

* Add SaveGroups method to AccountManager interface

* Refactoring

* Add SaveUsers and SaveGroups methods to store interface

* Refactor method SaveAccount to SaveUsers and SaveGroups

The method SaveAccount in user.go and group.go files was split into two separate methods. Now, user-specific data is handled by SaveUsers and group-specific data is handled by SaveGroups method. This provides a cleaner and more efficient way to save user and group data.

* Add account ID to user and group in SqlStore

* Refactor SaveUsers and SaveGroups in store

* Remove unnecessary ID assignment in SaveUsers and SaveGroups
2024-07-15 17:04:06 +03:00
2577100096 Limit GUI process execution to one per UID (#2267)
replaces PID with checking process name and path and UID checks
2024-07-15 14:53:52 +02:00
bc09348f5a Add logging option for wg device (#2271) 2024-07-15 14:45:18 +02:00
d5ba2ef6ec fix 2260: fallback serial to Board (#2263) 2024-07-15 14:43:50 +02:00
47752e1573 Support DNS routes on iOS (#2254) 2024-07-15 10:40:57 +02:00
58fbc1249c Fix parameter limit issue for Postgres store (#2261)
Added CreateBatchSize for both SQL stores and updated tests to test large accounts with Postgres, too. Increased the account peer size to 6K.
2024-07-12 09:28:53 +02:00
1cc341a268 Bump google.golang.org/grpc from 1.64.0 to 1.64.1 (#2248)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.64.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.64.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-12 08:52:27 +02:00
89df6e7242 Get client ui locale on windows natively (#2251) 2024-07-12 08:25:33 +02:00
f74646a3ac Add release version to windows binaries and update sign pipeline version (#2256) 2024-07-11 19:06:55 +02:00
e8c2fafccd Avoid empty domain overwrite (#2252) 2024-07-10 14:08:35 +02:00