Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
fix(server/LAN): Fixed The server's LAN IP cannot be proxied and is d…
Browse files Browse the repository at this point in the history
…irectly connected before entering the core
  • Loading branch information
2dust authored and AnGgIt86 committed Oct 8, 2024
1 parent b84acd3 commit f850cfa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/src/main/kotlin/com/neko/v2ray/util/SettingsManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.text.TextUtils
import com.neko.v2ray.AppConfig
import com.neko.v2ray.AppConfig.GEOIP_PRIVATE
import com.neko.v2ray.AppConfig.GEOSITE_PRIVATE
import com.neko.v2ray.AppConfig.TAG_DIRECT
import com.neko.v2ray.dto.RulesetItem
import com.neko.v2ray.dto.ServerConfig
import com.neko.v2ray.util.MmkvManager.decodeProfileConfig
Expand Down Expand Up @@ -111,10 +112,8 @@ object SettingsManager {

fun routingRulesetsBypassLan(): Boolean {
val rulesetItems = MmkvManager.decodeRoutingRulesets()
val exist = rulesetItems?.any {
it.enabled
&& (it.domain?.contains(GEOSITE_PRIVATE) == true
|| it.ip?.contains(GEOIP_PRIVATE) == true)
val exist = rulesetItems?.filter { it.enabled && it.outboundTag == TAG_DIRECT }?.any {
it.domain?.contains(GEOSITE_PRIVATE) == true || it.ip?.contains(GEOIP_PRIVATE) == true
}
return exist == true
}
Expand Down

0 comments on commit f850cfa

Please sign in to comment.