Feat: Add Pairing File Export URL callback and replace Wireguard with StosVPN (#962)

* Add Pairing File Export URL callback and replace Wireguard with StosVPN

* Fix Data()

* Add Switching Tab

* Fix Pairing Callback Template and fix spelling mistake

* Add Observer for openExportPairingFileConfirm

* Add Logging and fix certificate callback

* add func to Scene Delegate

* Fix ToastView and Logging

* Remove ?

* Fix Logging

* Call AppDelegate instead of SceneDelegate

* Fix Scene Delegate

* Set back SceneDelegate

* Add Logging

* Fix error

* Fix Case Sensitive

* Remove openExportPairingFileConfirm and fix AppDelegate.exportPairingFileNotification

* Remove Alert

* Remove Unnecessary code

* rename export() to exportPairingFile()
This commit is contained in:
Stossy11
2025-04-24 15:48:29 +10:00
committed by GitHub
parent 0e3c3dddfe
commit 4ff643805b
5 changed files with 82 additions and 27 deletions

View File

@@ -291,10 +291,20 @@ private extension AppDelegate
}
return true
case "pairing":
let queryItems = components.queryItems?.reduce(into: [String: String]()) { $0[$1.name.lowercased()] = $1.value } ?? [:]
guard let callbackTemplate = queryItems["urlName"]?.removingPercentEncoding else { return false }
DispatchQueue.main.async {
exportPairingFile(callbackTemplate)
}
return true
case "certificate":
let queryItems = components.queryItems?.reduce(into: [String: String]()) { $0[$1.name.lowercased()] = $1.value } ?? [:]
guard let callbackTemplate = queryItems["callback"]?.removingPercentEncoding else { return false }
guard let callbackTemplate = queryItems["callback_template"]?.removingPercentEncoding else { return false }
DispatchQueue.main.async {
NotificationCenter.default.post(name: AppDelegate.exportCertificateNotification, object: nil, userInfo: [AppDelegate.exportCertificateCallbackTemplateKey: callbackTemplate])