shadowsocks-android icon indicating copy to clipboard operation
shadowsocks-android copied to clipboard

Support for any ACL file (RFC)

Open Mygod opened this issue 4 years ago • 1 comments

After 857fb552e92720f94185bb74ebd43c2cd0bf8b53, the only special case this repo does for ACL file is to add bypass LAN routes:

https://github.com/shadowsocks/shadowsocks-android/blob/857fb552e92720f94185bb74ebd43c2cd0bf8b53/core/src/main/java/com/github/shadowsocks/bg/VpnService.kt#L192-L206

Unfortunately, this is known to be buggy on Android 10, so maybe we can remove this optimization as well.

Assuming we remove this, shadowsocks-android now essentially treats all ACL files virtually the same, so it makes sense now to allow the user to completely customize ACL. Here is my proposal for improved customizable ACL.

Better maintainability

There are currently a lot of redundancy in the acl files. We can allow all ACL files to import each other, e.g. bypass-china.acl could be simply:

[proxy_all]

#IMPORT_URL https://host/path/to/gfwlist.acl

[bypass_list]
# China IP blocks here...

Host reachable anywhere

Currently we host ACL files on shadowsocks.org, which is inaccessible from China. We can get around this issue by using GitHub or other CDNs, e.g. https://cdn.jsdelivr.net/gh/shadowsocks/shadowsocks-acl@v2/gfwlist.acl.

Remove ACL GUI editor

I think GUI editor is currently a rarely used feature. We should replace it with just a list of ACL urls, much like subscriptions. Built-in ACL will also use this format, but with a built-in offline cache.

(maybe GUI editor makes more sense if it is a web editor)

Fixes #2385. Any comments? @madeye

Mygod avatar May 13 '20 16:05 Mygod

Yeah, look good to me.

madeye avatar May 14 '20 00:05 madeye