阻止其他应用程序访问互联网
在我的应用程序中,我希望用户创建一个不允许访问互联网的应用程序黑名单。如何阻止某些其他应用程序访问互联网?
这是一个家长控制应用程序。我想确保只有具有过滤功能的浏览器才允许访问互联网,而不允许任何其他浏览器(其他应用程序都可以,只是浏览器不行)。
In my app I want the user to create a blacklist of apps that will not be allowed internet access. How might I prevent certain other apps from accessing the internet?
It's a parental control app. I want to make sure only the browser with filtering is allowed internet access and not any other browsers(other apps are OK, just not browsers).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
就像
Ad Free
所做的那样,您可以继续使用 root 访问权限并编辑主机文件以阻止与应用程序相关或由应用程序使用的网站。Like what
Ad Free
is doing, you can go on with a root access and edit the host file to block the websites related to or used by the apps.我认为您可以创建一个作为后台服务运行的代理应用程序。然后,您可以将浏览器设置为使用 localhost 作为代理服务器。
该服务必须在端口 80 上侦听来自浏览器的 HTTP 请求,创建真正的互联网请求,下载内容并将其在响应中发布回浏览器。
然后,您可以通过查看浏览器请求的 URL 来过滤和拒绝任何不需要的请求。
不过,这存在一些问题,最主要的问题是没有什么可以阻止用户自行关闭代理。
I think you could maybe create a proxy application that runs as a background service. You could then set your browser up to use localhost as the proxy server.
The service will have to listen on port 80 for HTTP requests from the browser, create a real internet request, download the content and post it back to the browser in it's response.
You could then filter and deny any unwanted requests by looking at the URL that the browser is requesting.
There are a few problems with this though, the main one being there is nothing to stop the user from turning off the proxy themselves.
您可以使用 DroidWall 进行黑白名单。正是你想要的:
您需要root权限!
评论:
下载:
http://code.google.com/p/droidwall/
You can use DroidWall for black and white listing. just what you wanted:
You need root access!
Review:
http://dottech.org/mobile/android/free-android-app-reviews/21485/android-root-required-block-apps-from-accessing-the-internet-with-droidwall/
Download:
http://code.google.com/p/droidwall/
安装Mobiwol:NoRoot Firewall,它是一个轻量级的应用程序,而且你与ROOT无关,非常有效。
https://play.google.com/store /apps/details?id=com.netspark.firewall&hl=en
install Mobiwol: NoRoot Firewall, it's light app, and you there is nothing to do with ROOT, very effective.
https://play.google.com/store/apps/details?id=com.netspark.firewall&hl=en