Hi @DTS Engineer,
Thank you for clarifying. I confirm that I am referring to Network Extensions within the context of System Extensions.
Regarding the first approach I mentioned earlier, I am using separate NEMachServiceNames in the Info.plist files for two different extensions, while using the same App Groups name for all extensions in their respective targets.
For the Second approach you suggested, I understand that in the configuration, we can place multiple extensions under the NEProviderClasses dictionary in the extension's entitlement file, and maintain a single NEMachServiceName in the Info.plist file of the Extension's target (Xcode Target2).
Given that I am new to this framework, I would greatly appreciate it if you could provide more detailed guidance on how to:
Utilize multiple NE Providers with a single system extension.
Activate these providers one after another.
Handle IPC (Inter-Process Communication) connections between the Main App and the single System Extension(apart from Info.plist config with service name)
Any detailed examples or documentation would be extremely helpful.
I am thinking of the following kind of project/folder structure(for Second approach), Correct me if I am wrong in understanding:
MyNetworkExtensionProject/
├── MyNetworkExtensionApp/ (Xcode Target1)
│ ├── AppDelegate.swift
│ ├── ViewController.swift
│ ├── Resources/
│ │ ├── Assets.xcassets
│ │ ├── Info.plist
│ │ └── Main.storyboard
│ └── MyNetworkExtensionApp.entitlements
│
├── MyNetworkSystemExtension/ (Xcode Target2)
│ ├── Providers/
│ │ ├── AppProxyProvider.swift
│ │ ├── DNSProxyProvider.swift
│ │ ├── ContentFilterProvider.swift
│ │ |── IPCConnection.swift
|. |. |--- OtherFiles for parsing etc
│ ├── Resources/
│ │ ├── Info.plist
│ │ └── main.swift
│ └── MyNetworkSystemExtension.entitlements
│
└── Frameworks/
├── NetworkExtension.framework
└── libbsm.tbd
Also, To capture HTTP(and HTTPS logs) of all kinds of network traffic, I am confused on which among 3 of the APIs/Classes best suites for this purpose for MacOS:
NEAppProxyProvider/
NETransparentProxyProvider/
Packet Tunnel Provider
And to capture/log DNS Records(all kinds possible), Is the NEDNSProxyProvider right one?
Kindly help me choose the best suitable one for my usecase
Your responses/clarifications are very helpful as I am starting with this project. Thanks a lot for your time and support
Topic:
App & System Services
SubTopic:
Networking
Tags: