由于我尝试为每个应用程序vpn开发mac OSX,因此我尝试了解有关NEAppProxyProvider的更多信息。
已经实现的是,可以启动应用程序代理,并且通过SafariDomains设置,可以通过AppProxyProvider中的handleNewFlow捕获来自Safari的流。现在,我尝试使用配置文件中设置的com.apple.vpn.managed.appmapping捕获来自指定应用程序的其他一些流。但是在安装配置文件后,“配置文件”中仅显示一个设置。我四处搜寻,试图找到个人资料的示例或模板,但没有任何帮助。请帮助我检查以下个人资料,看看其中是否有任何问题。
这里是配置文件,在数组中包含两个字典。第一个字典适用于Safari flow。第二个字典是针对每个应用的VPN,但似乎无法正确安装且无法正常工作。自从我从Apple开发人员论坛了解到SafariDomains不能与应用程序映射一起使用后,就删除了SafariDomains部分。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>IPv4</key>
<dict>
<key>OverridePrimary</key>
<integer>0</integer>
</dict>
<key>PayloadDescription</key>
<string>Configures VPN settings</string>
<key>PayloadDisplayName</key>
<string>VPN</string>
<key>PayloadIdentifier</key>
<string>com.apple.vpn.managed.applayer.330FBB83-639F-4F9E-9FA1-4FAC93E18B68</string>
<key>PayloadType</key>
<string>com.apple.vpn.managed.applayer</string>
<key>PayloadUUID</key>
<string>330FBB83-639F-4F9E-9FA1-4FAC93E18B68</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>Proxies</key>
<dict>
<key>HTTPEnable</key>
<integer>0</integer>
<key>HTTPSEnable</key>
<integer>0</integer>
</dict>
<key>UserDefinedName</key>
<string>appmapping</string>
<key>VPN</key>
<dict>
<key>AuthName</key>
<string>somebody</string>
<key>AuthPassword</key>
<string>opendoor</string>
<key>AuthenticationMethod</key>
<string>Password</string>
<key>ProviderBundleIdentifier</key>
<string>com.blob.macappproxy.macappproxy</string>
<key>ProviderType</key>
<string>app-proxy</string>
<key>RemoteAddress</key>
<string>127.0.0.1</string>
</dict>
<key>VPNSubType</key>
<string>com.blob.macappproxy</string>
<key>VPNType</key>
<string>VPN</string>
<key>OnDemandMatchAppEnabled</key>
<integer>1</integer>
<key>VendorConfig</key>
<dict/>
<key>VPNUUID</key>
<string>3D7A07D8-97D0-4E5A-BB04-1EB82DD12A35</string>
</dict>
<dict>
<key>PayloadDescription</key>
<string>Configures Per APP VPN mapping</string>
<key>PayloadDisplayName</key>
<string>Per APP VPN mapping</string>
<key>PayloadIdentifier</key>
<string>com.apple.vpn.managed.appmapping.A88E1A77-2CC2-4BF9-879C-97C3DF491EB2</string>
<key>PayloadType</key>
<string>com.apple.vpn.managed.appmapping</string>
<key>PayloadUUID</key>
<string>A88E1A77-2CC2-4BF9-879C-97C3DF491EB2</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>UserDefinedName</key>
<string>perappvpn</string>
<key>AppLayerVPNMapping</key>
<array>
<dict>
<key>Identifier</key>
<string>com.google.Chrome</string>
<key>VPNUUID</key>
<string>3D7A07D8-97D0-4E5A-BB04-1EB82DD12A35</string>
<key>DesignatedRequirement</key>
<string>(identifier "com.google.Chrome" or identifier "com.google.Chrome.beta" or identifier "com.google.Chrome.dev" or identifier "com.google.Chrome.canary") and certificate leaf = H"c9a99324ca3fcb23dbcc36bd5fd4f9753305130a"</string>
<key>SigningIdentifier</key>
<string>com.google.Chrome</string>
</dict>
</array>
</dict>
</array>
<key>PayloadDisplayName</key>
<string>some app proxy</string>
<key>PayloadIdentifier</key>
<string>blob-MacBook-Pro.A953E629-CD95-45B4-A42D-ECA2BA870A79</string>
<key>PayloadRemovalDisallowed</key>
<false/>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>1AEA709E-46D3-4293-B1E3-23EB8DD5B361</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>
应如何对其进行修改,以便在appproxyprovider的handleNewFlow方法中捕获指定应用程序的网络流?或者有人可以粘贴可行的个人资料?