Android开浏览器的ADRESS [英] Android get browser's adress

查看:310
本文介绍了Android开浏览器的ADRESS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方式来获得从用户尝试使用一些听众或东西,打开浏览器的地址,如果地址在数据库和地址被禁止,停止加载在用户的浏览器地址。这可能吗?如果是的话可以有人请告诉我该怎么办呢!

is there a way to get address from the browser that user is trying to open using some listener or something, and if the address is in the database and the address is banned, stop loading that address in the user's browser. Is this possible? If so can someone please tell me how to do it!

推荐答案

Android是Linux操作系统和你想要做的基本上是创建防火墙什么一番风味。要允许在Linux中防火墙的建立,的Netfilter提供

Android is a flavour of the Linux operating system and what you want to do is essentially create a firewall. To allow the creation of a firewall in Linux, Netfilter is provided:

Netfilter的是一套Linux内核,允许内核模块注册到网络堆栈回调函数里面钩

Netfilter is a set of hooks inside the Linux kernel that allows kernel modules to register callback functions with the network stack

然而,提供一个简单的界面来创建防火墙Linux版本通常实现 iptables的(基本上另一层Netfilter的顶部)。

However to provide a simpler interface to create a firewall Linux flavours typically implement iptables (essentially another layer on top of Netfilter).

iptables的是Linux内核的防火墙(如不同的Netfilter模块实现)提供的表格和链和规则它的商店。不同内核模块和方案目前用于不同的协议; iptables的适用于IPv4,ip6tables到IPv6,arptables到ARP和ebtables的以太网帧。

iptables are the tables provided by the Linux kernel firewall (implemented as different Netfilter modules) and the chains and rules it stores. Different kernel modules and programs are currently used for different protocols; iptables applies to IPv4, ip6tables to IPv6, arptables to ARP, and ebtables to Ethernet frames.

在linux下,实质上是创建的iptable链允许访问的网站以及阻挡传入的连接。

In linux you essentially create iptable chains to allow the access to websites as well as block incoming connections.

我不知道iptables的是Android实现。你将不得不去挖掘到源$ C ​​$ C为Android内核。其次,你需要有手机root权限。

I am not aware that iptables is implemented in Android. You would have to go digging into the source code for the Android kernel. Secondly you need to have root access to the phone.

如果个人的iptables / netfilter的是不是在Android内核中实现我想看看这样做。是的,它是一个大量的工作,但为什么要重新发明轮子?的

Personally if iptables/netfilter is not implemented in the Android kernel I would look at doing so. Yes it's a lot of work but why re-invent the wheel?

这篇关于Android开浏览器的ADRESS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆