Steps to reproduce:
System Extension developer mode must be turned on.
Launch SimpleFirewall app and press Start.
Attempt to open a connection on the port being filtered.
Observe you are prompted whether to allow the connection.
Press Stop, wait a moment, and press Start again.
Attempt to open a connection on the port being filtered.
Observe you are no longer prompted, the call to promptUser from the extension fails silently.
I think there's another bug in the promptUser method in the ViewController.
Calling into the UI from outside the main thread is unsafe. The last guard let condition needs to be moved into the async block below.>>>> let window = view.window else {
os_log("Got a promptUser call without valid flow info: %@", flowInfo)
responseHandler(true)
return
}
Kind regards, - Peter Sichel