Commit graph

19 commits

Author SHA1 Message Date
Ian VanSchooten
87c16ea95c
Fix iOS 16 support (#222)
In older versions of iOS, it's not possible to call `NETunnelProviderManager.loadAllFromPreferences()` from inside the network extension process.  We were seeing `NETunnelProviderManager objects cannot be instantiated from NEProvider processes` errors in iOS 16.  It's unclear exactly when the change happened to allow it, but as far as we can tell it was in iOS 17. 

To Test:
1. On a real device running iOS 16, ensure that enrolling as a Managed Nebula host works correctly.
2. Start the site.
3. Update the host in the admin panel and wait at least 15 minutes for a `checkForUpdate` from the mobile client.  You should get a `Host renewed` audit log for the host.  
4. Verify that there's a log for "Reloading Nebula" in the mobile host, and that it has an up-to-date config.
2025-01-17 12:31:13 -05:00
Ian VanSchooten
46f029a91d
Deal with some xcode warnings (#216)
This performs the recommended setting updates from xcode, though I needed to turn off `ENABLE_USER_SCRIPT_SANDBOXING` as it does not seem to be fully compatible with flutter.

I also dealt with a warning of: "Extension declares a conformance of imported type 'String' to imported protocol 'Error'; this will not behave correctly if the owners of 'Swift' introduce this conformance in the future", by creating and using some custom error types.

Lastly, I fixed our podfile to ensure that the `IPHONEOS_DEPLOYMENT_TARGET` is at least 12, which is our project setting.
2025-01-13 12:06:57 -05:00
Ian VanSchooten
c781ac4d91
Allow saving invalid sites (#215)
Closes https://github.com/DefinedNet/mobile_nebula/issues/191

Nate would like us to be able to save an invalid site, as a way of saving partial progress and then fixing issues later on, so that's what this PR does, for both Android and iOS.  To test, add a site, give it a name, and press save.  You should be taken to a list of sites, including the newly created invalid site.
2025-01-13 09:28:52 -05:00
Ian VanSchooten
e58078fa48
Handle managed nebula updates correctly (#186)
This fixes a few issues:

1) When updates are made, we will no longer create duplicate VPN profiles, rather we will update existing ones.
2) We will correctly update an existing profile when the site is running and an update is received, rather than attempting to create a new profile, which failed due to permissions errors.  
3) We will always reload nebula, even if we can't successfully save the VPN profile.
4) The default polling interval of 15 minutes is restored (previously set to 30 seconds during testing).

So far in manual testing I've confirmed that I do not lose the tunnel to my lighthouse even after the original 30 minute expiration of a certificate.  This confirms that reloads are occurring correctly.  Additionally, duplicate sites are not created when updates occur while the site is disconnected.
2024-10-18 12:32:48 -04:00
Ian VanSchooten
fb664308ae
Add providerBundleIdentifier to avoid permissions errors (#185) 2024-10-17 11:08:34 -04:00
Ian VanSchooten
494f071ed5
Move print logs to OSLogger (#179)
This aids in debugging in console.app, since print statements from the PacketTunnelProvider are not shown in xcode's console.
2024-10-16 14:28:07 -04:00
Ian VanSchooten
fcf21f6f6b
Fix issues with new xcode builds (#177)
John found an issue in gomobile that seems to be the culprit of one of these issues: https://github.com/golang/go/issues/53316#issuecomment-2407626810
2024-10-11 11:21:34 -04:00
Nate Brown
81901b5dae
Rework the ios startup flow slightly to avoid crashing on ios 16.5 (#132) 2023-05-23 17:31:07 -05:00
John Maguire
693c7b6346
Hide CA expiration errors on managed sites (#128) 2023-05-17 12:10:11 -04:00
Nate Brown
69d0641874
Store the raw dn managed config to be consumed by nebula later (#127) 2023-05-16 10:25:24 -05:00
Caleb Jasik
84d1256656
Fix typos in comments (#100) 2022-11-22 10:20:35 -06:00
Nate Brown
bb457c7c83
Sometimes the list of remotes can be null (#96) 2022-11-21 13:31:58 -06:00
John Maguire
c7a53c3905
Support DN host enrollment (#86)
Co-authored-by: Nate Brown <nbrown.us@gmail.com>
2022-11-17 16:43:16 -05:00
Nate Brown
6c188ff1d1
Get ready for ios 15 (#47) 2021-09-21 09:31:26 -05:00
Nathan Brown
4c28cc196e
Rework ios ipc (#28) 2021-04-27 10:29:28 -05:00
Nathan Brown
1283ce30e9
IPV6 support (#24) 2021-04-23 16:23:06 -05:00
Nate Brown
1a4cbceda0 Run check config on app boot, fix early error reporting on android 2020-08-17 11:56:15 -05:00
Nate Brown
50d50f690b Add some protections against the incorrect cert type being used 2020-08-10 10:48:00 -05:00
Nate Brown
b546dd1c9d Initial commit 2020-07-27 15:43:58 -05:00