support hosts#2157
Conversation
|
In our use case, parseNumericAddress is performance critical as it needs to be invoked once for every rule in ACL. That's why we are using inet_pton and parseNumericAddress as a fallback. You can attach some benchmark for |
|
@Mygod 我这个是给解析hosts文件用的,不可能单独剥离出来。另外实现是从guava里抠的(代码里注释写了port from),不是我自己写的。如果你们不用,那就用另外的实现好了。 |
|
Use this for now: |
已经改了。 |
所以特意没有声明权限。因为这个目录在sdcard里,Q之前,可以用Solid Explorer等编辑器来直接修改这个文件,类似root后的手机直接修改 |
|
Can we follow the profile import logic to import hosts file? |
|
I will make it a global option. |
这好像是ui部分的改动?这个我无能为力了 |
|
@ayanamist Thank you for your contribution. Please review the code. And before you ask, yes I did expect you to write these UI codes. 😄 I had to rebase this onto I have not tested the hosts functionality yet, you can look into that. Also you are welcome to contribute a similar UI for TV (if not I will do it later). |
|
我看现在是用merge的方式把代码从 |
|
No everything is fine now. Just give this ui a spin and see if it works properly. |
|
@madeye @ayanamist Please review the changes and do some testing. |
|
Yeah, I will check this later. |
|
Cool! Test it locally and works very well. |
|
@ayanamist Thoughts? If not, we will merge this into #2162. |
LGTM |
fix #2150