19 Commits

Author SHA1 Message Date
Diego Romar 8da6029c92 Reverse cleanup order on VPNService's onDestroy
Now it disposes of network listener components
before stopping engineRunner
2025-11-13 09:41:21 -03:00
Diego Romar 9efe476eb1 Add restart runnable and timeout callback to EngineRestarter
Restart runnable is used as a debouncing mechanism to
prevent concurrent restarts
Timeout callback is to reset the isRestartInProgress flag's
value if the engine takes too long to restart
2025-11-11 16:02:06 -03:00
Diego Romar 065cb6159d Wrap connectivityManager.unregisterNetworkCallback with try-catch 2025-11-11 11:15:35 -03:00
Diego Romar 10084e52eb Replace HashMap usage with ConcurrentHashMap
The availableNetworkTypes HashMap is accessed from network
callback threads without synchronization
2025-11-11 11:15:08 -03:00
Diego Romar 5a56208dad Use EngineRestarter as implementation of NetworkToggleListener
When subscribing to ConcreteNetworkAvailabilityListener
2025-10-16 21:33:57 -03:00
Diego Romar 806677988b Add some documentation to NetworkToggleListener 2025-10-16 21:28:43 -03:00
Diego Romar a6aa2c70e7 Add LOGTAG to NetworkChangeDetector 2025-10-16 21:28:21 -03:00
Diego Romar 4af0f08afb Add EngineRestarter to restart the Go engine 2025-10-16 21:28:05 -03:00
Diego Romar c8aaba78f2 Change EngineRunner's Set implementation
From HashSet to ConcurrentHashMap's KeySet,
which is thread-safe.
2025-10-16 20:37:38 -03:00
Diego Romar 5e3e35193c Rename NetworkChangeListener to NetworkAvailabilityListener 2025-10-15 23:38:13 -03:00
Diego Romar 4b9da6abcd Add unit tests for ConcreteNetworkChangeListener 2025-10-14 22:26:47 -03:00
Diego Romar 93fd5541dd Add network toggle listener to VPNService 2025-10-13 23:05:02 -03:00
Diego Romar 7b9932ce71 Add network change detector and listeners 2025-10-13 23:04:07 -03:00
Diego Romar 449db69f93 Add force relay connection option (#77)
This adds a new switch control to the advanced settings so that users may opt to force usage of relay when connecting to peers.
It also warns the user that this configuration change will only be applied the next time they connect to the VPN.
2025-09-10 19:21:04 +02:00
Viktor Liu db3267081c Catch dns add error (#73) 2025-08-11 11:39:57 +02:00
Zoltan Papp e426c0d82b Disable pidfd check on Android 11 and below (#67) 2025-07-09 22:32:26 +02:00
Zoltan Papp aa657852a4 Handle NetworkCallback was not registered exception (#64) 2025-07-01 21:02:11 +02:00
Zoltan Papp 86cb38eb7c List networks (#56)
* Add networks view
* Fix route change notification
2025-06-19 15:22:32 +02:00
Zoltan Papp f81f81ce6e rewrite client in Java (#54)
Rewrite the client in native Java.

There were no new features added in this change, but that's the first step in moving to a faster development cycle for NetBird client.
2025-06-05 20:37:51 +02:00