{"action":"created","issue":{"url":"https://api.github.com/repos/shadowsocks/shadowsocks-iOS/issues/124","labels_url":"https://api.github.com/repos/shadowsocks/shadowsocks-iOS/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/shadowsocks/shadowsocks-iOS/issues/124/comments","events_url":"https://api.github.com/repos/shadowsocks/shadowsocks-iOS/issues/124/events","html_url":"https://github.com/shadowsocks/shadowsocks-iOS/issues/124","id":86420331,"number":124,"title":"Adopting iOS 9 network extension points","user":{"login":"clowwindy","id":1073082,"avatar_url":"https://avatars.githubusercontent.com/u/1073082?v=3","gravatar_id":"","url":"https://api.github.com/users/clowwindy","html_url":"https://github.com/clowwindy","followers_url":"https://api.github.com/users/clowwindy/followers","following_url":"https://api.github.com/users/clowwindy/following{/other_user}","gists_url":"https://api.github.com/users/clowwindy/gists{/gist_id}","starred_url":"https://api.github.com/users/clowwindy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clowwindy/subscriptions","organizations_url":"https://api.github.com/users/clowwindy/orgs","repos_url":"https://api.github.com/users/clowwindy/repos","events_url":"https://api.github.com/users/clowwindy/events{/privacy}","received_events_url":"https://api.github.com/users/clowwindy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-06-09T02:56:48Z","updated_at":"2015-06-27T15:47:22Z","closed_at":null,"body":"> Network extension points:\r\nUse the Packet Tunnel Provider extension point to implement the client side of a custom VPN tunneling protocol.\r\nUse the App Proxy Provider extension point to implement the client side of a custom transparent network proxy protocol.\r\nUse the Filter Data Provider and the Filter Control Provider extension points to implement dynamic, on-device network content filtering.\r\nEach of the network extension points requires special permission from Apple.\r\n"},"comment":{"url":"https://api.github.com/repos/shadowsocks/shadowsocks-iOS/issues/comments/116090537","html_url":"https://github.com/shadowsocks/shadowsocks-iOS/issues/124#issuecomment-116090537","issue_url":"https://api.github.com/repos/shadowsocks/shadowsocks-iOS/issues/124","id":116090537,"user":{"login":"angelovAlex","id":4116419,"avatar_url":"https://avatars.githubusercontent.com/u/4116419?v=3","gravatar_id":"","url":"https://api.github.com/users/angelovAlex","html_url":"https://github.com/angelovAlex","followers_url":"https://api.github.com/users/angelovAlex/followers","following_url":"https://api.github.com/users/angelovAlex/following{/other_user}","gists_url":"https://api.github.com/users/angelovAlex/gists{/gist_id}","starred_url":"https://api.github.com/users/angelovAlex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelovAlex/subscriptions","organizations_url":"https://api.github.com/users/angelovAlex/orgs","repos_url":"https://api.github.com/users/angelovAlex/repos","events_url":"https://api.github.com/users/angelovAlex/events{/privacy}","received_events_url":"https://api.github.com/users/angelovAlex/received_events","type":"User","site_admin":false},"created_at":"2015-06-27T15:47:22Z","updated_at":"2015-06-27T15:47:22Z","body":"There're actually templates for Xcode. You need to install them from  \r\n```\r\n/System/Library/Frameworks/NetworkExtension.framework/Versions/A/Resources/NEProviderTargetTemplates.pkg\r\n```\r\nBut I have not found the way of how to activate a vpn. As there's no shared instance for ```NETunnelProviderManager``` I think we need to create a new one.\r\n```\r\n[NETunnelProviderManager loadAllFromPreferencesWithCompletionHandler:^(NSArray<NETunnelProviderManager *> * __nullable managers, NSError * __nullable error) {\r\n        \r\n        if (managers.count <= 0){\r\n            NETunnelProviderProtocol *protocol = [[NETunnelProviderProtocol alloc] init];\r\n            protocol.providerConfiguration = @{ @\"some parameter\" : @\"some value\" };\r\n            protocol.providerBundleIdentifier = @\"com.example.vpn.vpntunnel\";\r\n            \r\n            NETunnelProviderManager *manager = [[NETunnelProviderManager alloc] init];\r\n            [manager setProtocol:protocol];\r\n            [manager setLocalizedDescription:@\"My VPN\"];\r\n            [manager setOnDemandEnabled:NO];\r\n            [manager setEnabled:YES];\r\n            \r\n            [manager loadFromPreferencesWithCompletionHandler:^(NSError * __nullable error) {\r\n                NSLog(@\"%@\", error);\r\n            }];\r\n        }\r\n    }];\r\n```\r\nOn the line ```NETunnelProviderManager *manager = [[NETunnelProviderManager alloc] init];```, this message appears in the console app:\r\n```\r\n6/27/15 5:31:13.845 PM VPNOSX[1403]: Application does not have the required entitlements.\r\n```\r\nIt doesn't say which entitlements and there's no any documentation about it.\r\nI want to try this api on MAC OS 10.11. I understand the reason why I need to ask apple for some permission to publish the app with this api to app store, but I can't believe that I have to ask them for permission to run this api on my development machine.\r\nSorry, that's a little bit off topic, but there's the only thread that I found in the internet so far."}}