mirror of
https://github.com/2dust/v2rayNG.git
synced 2025-06-28 12:19:52 +00:00
Xray-core default FakeIPv6 Pool should not bypass and should route (#4649)
* Update V2RayVpnService.kt * Update V2RayVpnService.kt * Update AppConfig.kt
This commit is contained in:
parent
fdb67a86f4
commit
fff6ab30e6
2 changed files with 3 additions and 2 deletions
|
@ -189,7 +189,7 @@ object AppConfig {
|
||||||
val DNS_YANDEX_ADDRESSES = arrayListOf("77.88.8.8", "77.88.8.1", "2a02:6b8::feed:0ff", "2a02:6b8:0:1::feed:0ff")
|
val DNS_YANDEX_ADDRESSES = arrayListOf("77.88.8.8", "77.88.8.1", "2a02:6b8::feed:0ff", "2a02:6b8:0:1::feed:0ff")
|
||||||
|
|
||||||
//minimum list https://serverfault.com/a/304791
|
//minimum list https://serverfault.com/a/304791
|
||||||
val BYPASS_PRIVATE_IP_LIST = arrayListOf(
|
val ROUTED_IP_LIST = arrayListOf(
|
||||||
"0.0.0.0/5",
|
"0.0.0.0/5",
|
||||||
"8.0.0.0/7",
|
"8.0.0.0/7",
|
||||||
"11.0.0.0/8",
|
"11.0.0.0/8",
|
||||||
|
|
|
@ -167,7 +167,7 @@ class V2RayVpnService : VpnService(), ServiceControl {
|
||||||
//builder.addDnsServer(PRIVATE_VLAN4_ROUTER)
|
//builder.addDnsServer(PRIVATE_VLAN4_ROUTER)
|
||||||
val bypassLan = SettingsManager.routingRulesetsBypassLan()
|
val bypassLan = SettingsManager.routingRulesetsBypassLan()
|
||||||
if (bypassLan) {
|
if (bypassLan) {
|
||||||
AppConfig.BYPASS_PRIVATE_IP_LIST.forEach {
|
AppConfig.ROUTED_IP_LIST.forEach {
|
||||||
val addr = it.split('/')
|
val addr = it.split('/')
|
||||||
builder.addRoute(addr[0], addr[1].toInt())
|
builder.addRoute(addr[0], addr[1].toInt())
|
||||||
}
|
}
|
||||||
|
@ -179,6 +179,7 @@ class V2RayVpnService : VpnService(), ServiceControl {
|
||||||
builder.addAddress(PRIVATE_VLAN6_CLIENT, 126)
|
builder.addAddress(PRIVATE_VLAN6_CLIENT, 126)
|
||||||
if (bypassLan) {
|
if (bypassLan) {
|
||||||
builder.addRoute("2000::", 3) //currently only 1/8 of total ipV6 is in use
|
builder.addRoute("2000::", 3) //currently only 1/8 of total ipV6 is in use
|
||||||
|
builder.addRoute("fc00::", 18) //Xray-core default FakeIPv6 Pool
|
||||||
} else {
|
} else {
|
||||||
builder.addRoute("::", 0)
|
builder.addRoute("::", 0)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue