Hi there,
This is the case of using dns proxy provider on ios. One thing noticed is that when the system extension process of dns proxy crashes, it is not re-spawn automatically by the wrapper process as it is when using the same dns proxy provider under macOS.
The test I carried out was:
- Under macOS
Launch an application with dns proxy provider sys extension. Kill that sys extension process. After several seconds, another sys extension process of dns proxy extension will be re-spawn.
sudo ps -A|grep macappproxy
Password:
47796 ?? 0:00.35 /Applications/macappproxy.app/Contents/MacOS/macappproxy
47875 ?? 0:00.62 /Library/SystemExtensions/439F12A7-1304-4A92-BEED-3EBEC979ADBE/com.familyzone.macappproxy.fzmacdnsproxy.systemextension/Contents/MacOS/com.familyzone.macappproxy.fzmacdnsproxy
47929 ttys001 0:00.00 grep macappproxy
AU-L-0306:fc-ios-edu-client richardwang$ sudo pkill -9 com.familyzone.macappproxy.fzmacdnsproxy
AU-L-0306:fc-ios-edu-client richardwang$ sudo ps -A|grep macappproxy
47796 ?? 0:00.35 /Applications/macappproxy.app/Contents/MacOS/macappproxy
48433 ?? 0:00.31 /Library/SystemExtensions/439F12A7-1304-4A92-BEED-3EBEC979ADBE/com.familyzone.macappproxy.fzmacdnsproxy.systemextension/Contents/MacOS/com.familyzone.macappproxy.fzmacdnsproxy
48531 ttys001 0:00.00 grep macappproxy
We can see from above that dns proxy pid changed after it was killed and re-spawn.
- Under ios
Doing the same thing, but slightly different: By adding below code into startProxy(), crashing dns proxy.
1 let bug: Int? = nil
2 os_log("bug: %{public}s", log: Log.ext, type: .debug, bug!)
It can be seen from below the log that “starting proxy“ happens three times before it died. It makes no difference if we put the same bug inside handleNewFlow(). And that causes no browsing through under incognito mode.
Can you help confirm this? If it is the case, is there any way to guard sys extension process and respawn it as a kind of robusness?
Thanks in advance for any suggestion. Richard