Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4f02c9bd6 | ||
|
|
e567719f5b | ||
|
|
8407fc5825 | ||
|
|
a3e49dcc3d |
@@ -458,12 +458,10 @@ object V2rayConfigUtil {
|
|||||||
rulesIP.outboundTag = tag
|
rulesIP.outboundTag = tag
|
||||||
rulesIP.ip = ArrayList<String>()
|
rulesIP.ip = ArrayList<String>()
|
||||||
|
|
||||||
userRule.trim().replace("\n", "")
|
userRule.split(",").map { it.trim() }.forEach {
|
||||||
.split(",")
|
|
||||||
.forEach {
|
|
||||||
if (Utils.isIpAddress(it) || it.startsWith("geoip:")) {
|
if (Utils.isIpAddress(it) || it.startsWith("geoip:")) {
|
||||||
rulesIP.ip?.add(it)
|
rulesIP.ip?.add(it)
|
||||||
} else if (it.isNotBlank() || it.isNotEmpty())
|
} else if (it.isNotEmpty())
|
||||||
// if (Utils.isValidUrl(it)
|
// if (Utils.isValidUrl(it)
|
||||||
// || it.startsWith("geosite:")
|
// || it.startsWith("geosite:")
|
||||||
// || it.startsWith("regexp:")
|
// || it.startsWith("regexp:")
|
||||||
@@ -487,9 +485,8 @@ object V2rayConfigUtil {
|
|||||||
|
|
||||||
private fun userRule2Domian(userRule: String): ArrayList<String> {
|
private fun userRule2Domian(userRule: String): ArrayList<String> {
|
||||||
val domain = ArrayList<String>()
|
val domain = ArrayList<String>()
|
||||||
userRule.trim().replace("\n", "").split(",").forEach {
|
userRule.split(",").map { it.trim() }.forEach {
|
||||||
if ((it.startsWith("geosite:") || it.startsWith("domain:")) &&
|
if (it.startsWith("geosite:") || it.startsWith("domain:")) {
|
||||||
it.isNotBlank() && it.isNotEmpty()) {
|
|
||||||
domain.add(it)
|
domain.add(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,8 @@
|
|||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1"
|
||||||
|
android:nextFocusRight="@+id/fab" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layout_test"
|
android:id="@+id/layout_test"
|
||||||
@@ -96,7 +97,8 @@
|
|||||||
android:src="@drawable/ic_v_idle"
|
android:src="@drawable/ic_v_idle"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
app:layout_anchorGravity="bottom|right|end" />
|
app:layout_anchorGravity="bottom|right|end"
|
||||||
|
android:nextFocusLeft="@+id/recycler_view" />
|
||||||
|
|
||||||
</com.github.jorgecastilloprz.FABProgressCircle>
|
</com.github.jorgecastilloprz.FABProgressCircle>
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user