简体   繁体   English

我可以在iOS应用中设置设备级代理吗? 怎么样?

[英]Can I set a device level proxy within an iOS app? How?

Can I develop an app that uses a specified HTTP proxy for all web requests? 我可以为所有Web请求开发使用指定HTTP代理的应用程序吗? If yes, how can I implement such feature in the app? 如果是,我如何在应用程序中实现此类功能? (any similar links are also useful) (任何类似的链接也很有用)

And, can I set this proxy configuration to device level from within the app? 并且,我可以在应用程序内将此代理配置设置为设备级别吗?

Please direct to any related information or reading. 请直接阅读相关信息或阅读。 Thanks :) 谢谢 :)

You can't change the device configuration from within the app, imagine how insecure would be if apps could do it, they could redirect all the phone traffic to their proxies. 您无法在应用程序中更改设备配置,想象如果应用程序可以执行此操作会有多么不安全,他们可以将所有电话流量重定向到其代理。

And for doing it on your own app, you'll have to do it yourself too, try creating your own url request subclassing NSURLRequest 要在自己的应用程序上执行此操作,您也必须自己完成,尝试创建自己的URL请求子类化NSURLRequest

A standard app store app cannot do it, but apparently a select few apps have been blessed with additional non-standard, undocumented entitlements by Apple to enable the setup of a device-wide VPN configuration. 标准的应用程序商店应用程序无法做到这一点,但显然有一些精选的应用程序已获得Apple的其他非标准,未记录的权利,以便能够设置设备范围的VPN配置。 See http://blog.michael.kuron-germany.de/2010/09/ios-4-1-undocumented-vpn-api-used-by-cisco-anyconnect/ for some hints on how that works. 有关如何工作的一些提示,请参见http://blog.michael.kuron-germany.de/2010/09/ios-4-1-undocumented-vpn-api-used-by-cisco-anyconnect/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM