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.
This commit is contained in:
Ian VanSchooten 2025-01-13 09:28:52 -05:00 committed by GitHub
parent 7cb1da2504
commit c781ac4d91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 5 deletions

View file

@ -95,9 +95,6 @@ class SiteList(context: Context) {
try { try {
val site = Site(context, siteDir) 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 // Make sure we can load the DN credentials if managed
if (site.managed) { if (site.managed) {
site.getDNCredentials(context) site.getDNCredentials(context)

View file

@ -397,8 +397,8 @@ struct IncomingSite: Codable {
var id: String var id: String
var staticHostmap: Dictionary<String, StaticHosts> var staticHostmap: Dictionary<String, StaticHosts>
var unsafeRoutes: [UnsafeRoute]? var unsafeRoutes: [UnsafeRoute]?
var cert: String var cert: String?
var ca: String var ca: String?
var lhDuration: Int var lhDuration: Int
var port: Int var port: Int
var mtu: Int? var mtu: Int?