Android读取手机代理设置
如果用户在代理后面,他可以在“接入点选项”下的 Android 手机中设置代理设置,有没有办法我可以从 Android 手机读取代理设置?
If user behind proxy he can set proxy settings in android handset under 'access point option' is there a way i can read proxy settings from android handset?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
android.net.Proxy 类只会为您提供主机和端口 - 我的代理也需要用户名和密码。
我能够挖掘 Android 源代码并找到其他代理值的存储位置。这在 Android 调试器中有效 - 我还没有在实际设备上尝试过。
(com.android.providers.telephony.TelephonyProvider 包含 URI 和列名称。)
The android.net.Proxy class will only give you the host and port - my proxy required user and password also.
I was able to dig through the Android source and found where the other proxy values are stored. This works in the Android debugger - I haven't tried this on an actual device.
(Android source of com.android.providers.telephony.TelephonyProvider that contained the URI and column names.)
您可以使用 android.net.Proxy 类来获取有关 Proxy 的信息主机和端口。
You can use android.net.Proxy class to get info about Proxy Host and Port.
我正在开发 Android 代理库 尝试抽象每个 Android 版本对代理设置的访问权限。您可以轻松获取用户当前选择的代理设置。
I'm developing the Android Proxy Library that try to abstract the access to proxy settings for every Android version. You can easily get the proxy settings currently selected by the user.