From c781ac4d91392c6947687c1ed1841d469191097f Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Mon, 13 Jan 2025 09:28:52 -0500 Subject: [PATCH] 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. --- .../app/src/main/kotlin/net/defined/mobile_nebula/Sites.kt | 3 --- ios/NebulaNetworkExtension/Site.swift | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/android/app/src/main/kotlin/net/defined/mobile_nebula/Sites.kt b/android/app/src/main/kotlin/net/defined/mobile_nebula/Sites.kt index c86d617..66ede6c 100644 --- a/android/app/src/main/kotlin/net/defined/mobile_nebula/Sites.kt +++ b/android/app/src/main/kotlin/net/defined/mobile_nebula/Sites.kt @@ -95,9 +95,6 @@ class SiteList(context: Context) { try { val site = Site(context, siteDir) - // Make sure we can load the private key - site.getKey(context) - // Make sure we can load the DN credentials if managed if (site.managed) { site.getDNCredentials(context) diff --git a/ios/NebulaNetworkExtension/Site.swift b/ios/NebulaNetworkExtension/Site.swift index 8f034ec..af77e9f 100644 --- a/ios/NebulaNetworkExtension/Site.swift +++ b/ios/NebulaNetworkExtension/Site.swift @@ -397,8 +397,8 @@ struct IncomingSite: Codable { var id: String var staticHostmap: Dictionary var unsafeRoutes: [UnsafeRoute]? - var cert: String - var ca: String + var cert: String? + var ca: String? var lhDuration: Int var port: Int var mtu: Int?