-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support hosts #2157
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: shadowsocks-android/core/src/main/java/com/github/shadowsocks/utils/Utils.kt Lines 57 to 58 in 6b60d91
|
9a10338
to
d9663f8
Compare
d9663f8
to
85131e2
Compare
已经改了。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be missing STORAGE permission but it doesn't matter. Also here's why I don't support using external storage.
core/src/main/java/com/github/shadowsocks/net/LocalDnsServer.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/github/shadowsocks/net/LocalDnsServer.kt
Outdated
Show resolved
Hide resolved
core/src/main/java/com/github/shadowsocks/net/LocalDnsServer.kt
Outdated
Show resolved
Hide resolved
所以特意没有声明权限。因为这个目录在sdcard里,Q之前,可以用Solid Explorer等编辑器来直接修改这个文件,类似root后的手机直接修改 |
f32e85b
to
4f9790c
Compare
4f9790c
to
b89dccd
Compare
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ayanamist Thoughts? If not, we will merge this into #2162. |
LGTM |
fix #2150