You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order for Blocker to offer support for blocking specific domains or IP addresses, it must possess the capability to manage the system hosts file. As for now, the application doesn't support it.
We should create a new module to provide the basic foundation for the hosts file modification.
Create a new module called hosts under the core group, this module provides all core features to control the hosts file.
Create an abstract representation of the hosts file within the Android system.
Provide the ability to add and remove IPs and domains in the host by using the root permission gained by the application.
Nice to have: In addition to root mode utilization, consider incorporating an abstraction layer for alternative methods of managing the hosts file, such as Shizuku or Knox.
Is there an existing issue for this?
Describe the problem
Blocker可以通过修改hosts文件来提供封禁特定的域名或者IP地址的功能。对于修改hosts这个功能来说,我们需要把对hosts修改这个操作放到core组中,作为一个独立的模块来进行封装。
In order for Blocker to offer support for blocking specific domains or IP addresses, it must possess the capability to manage the system hosts file. As for now, the application doesn't support it.
We should create a new module to provide the basic foundation for the hosts file modification.
Describe the solution
core
功能组下新建一个新模块,名叫hosts
。这个模块包含了修改hosts文件的核心功能。可以有的额外功能:把修改hosts文件的方法抽象成为一个接口,这样可以不修改上层的逻辑就使用不同的方式来修改hosts文件(比如使用Shizuku提供的权限,或者是Knox的管理权限来进行修改hosts文件)
hosts
under thecore
group, this module provides all core features to control the hosts file.Nice to have: In addition to root mode utilization, consider incorporating an abstraction layer for alternative methods of managing the hosts file, such as Shizuku or Knox.
Additional context
对于每一个被操控的域名或者IP来说,他们有三种状态,这三种状态在hosts文件里的表达分别为(以localhost为例):
激活状态:
127.0.0.1 localhost
未激活但是在列表里等待操作的状态:
#127.0.0.1 localhost
从列表删除里的状态:
列表里没有这一行
For each manipulated domain or IP, they have three states, which are represented in the hosts file as follows (using localhost as an example):
127.0.0.1 localhost
#127.0.0.1 localhost
This line is not in the list
The text was updated successfully, but these errors were encountered: