add IP-CIDR6 parse
This commit is contained in:
4 files changed
+9
-4
No files matched your search
+2
-2
@@ -11,8 +11,8 @@ android {
|
||||
applicationId "com.github.kr328.clash"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
versionCode 10001
|
||||
versionName "1.0.1-alpha"
|
||||
versionCode 10002
|
||||
versionName "1.0.2-alpha"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.charleskorn.kaml.Yaml
|
||||
import com.charleskorn.kaml.YamlConfiguration
|
||||
import com.charleskorn.kaml.YamlException
|
||||
import com.github.kr328.clash.adapter.FormAdapter
|
||||
import com.github.kr328.clash.model.ClashProfile
|
||||
import com.github.kr328.clash.service.data.ClashProfileEntity
|
||||
@@ -126,7 +127,7 @@ class ImportFileActivity : BaseActivity() {
|
||||
} catch (e: Exception) {
|
||||
Snackbar.make(
|
||||
activity_import_file_root,
|
||||
getString(R.string.clash_profile_invalid, e.toString()),
|
||||
getString(R.string.clash_profile_invalid, e.message?.replace(YamlException::class.java.name + ":", "") ?: "Unknown"),
|
||||
Snackbar.LENGTH_LONG
|
||||
).show()
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.charleskorn.kaml.Yaml
|
||||
import com.charleskorn.kaml.YamlConfiguration
|
||||
import com.charleskorn.kaml.YamlException
|
||||
import com.github.kr328.clash.adapter.FormAdapter
|
||||
import com.github.kr328.clash.model.ClashProfile
|
||||
import com.github.kr328.clash.service.data.ClashProfileEntity
|
||||
@@ -122,7 +123,7 @@ class ImportUrlActivity : BaseActivity() {
|
||||
runOnUiThread {
|
||||
Snackbar.make(
|
||||
activity_import_url_root,
|
||||
getString(R.string.clash_profile_invalid, e.toString()),
|
||||
getString(R.string.clash_profile_invalid, e.message?.replace(YamlException::class.java.name + ":", "") ?: "Unknown"),
|
||||
Snackbar.LENGTH_LONG
|
||||
).show()
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ data class ClashRule(val matcher: Matcher, val pattern: String, val target: Stri
|
||||
DOMAIN_KEYWORD,
|
||||
DOMAIN,
|
||||
IP_CIDR,
|
||||
IP_CIDR6,
|
||||
SRC_IP_CIDR,
|
||||
GEOIP,
|
||||
DST_PORT,
|
||||
@@ -23,6 +24,7 @@ data class ClashRule(val matcher: Matcher, val pattern: String, val target: Stri
|
||||
DOMAIN_KEYWORD -> "DOMAIN-KEYWORD"
|
||||
DOMAIN -> "DOMAIN"
|
||||
IP_CIDR -> "IP-CIDR"
|
||||
IP_CIDR6 -> "IP-CIDR6"
|
||||
SRC_IP_CIDR -> "SRC-IP-CIDR"
|
||||
GEOIP -> "GEOIP"
|
||||
DST_PORT -> "DST-PORT"
|
||||
@@ -38,6 +40,7 @@ data class ClashRule(val matcher: Matcher, val pattern: String, val target: Stri
|
||||
"DOMAIN-KEYWORD" -> DOMAIN_KEYWORD
|
||||
"DOMAIN" -> DOMAIN
|
||||
"IP-CIDR" -> IP_CIDR
|
||||
"IP-CIDR6" -> IP_CIDR6
|
||||
"SRC-IP-CIDR" -> SRC_IP_CIDR
|
||||
"GEOIP" -> GEOIP
|
||||
"DST-PORT" -> DST_PORT
|
||||
|
||||
Reference in new issue
Block a user