This commit is contained in:
Max Lv
2017-12-10 22:51:18 +08:00
parent 7688cbe23e
commit aa53318408
3 changed files with 19 additions and 1 deletions
@@ -46,6 +46,7 @@ class Acl {
val networkAclParser = "^IMPORT_URL\\s*<(.+)>\\s*$".toRegex()
fun getFile(id: String) = File(app.filesDir, id + ".acl")
val customRules: Acl get() {
val acl = Acl()
try {
@@ -143,6 +144,7 @@ class Acl {
for (item in (if (bypass) proxySubnets else bypassSubnets).asIterable()) this.subnets.add(item)
return this
}
fun fromId(id: String): Acl = fromReader(Acl.getFile(id).bufferedReader())
fun flatten(depth: Int): Acl {