Skip to content

Commit fff6ab3

Browse files
authored
Xray-core default FakeIPv6 Pool should not bypass and should route (#4649)
* Update V2RayVpnService.kt * Update V2RayVpnService.kt * Update AppConfig.kt
1 parent fdb67a8 commit fff6ab3

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

V2rayNG/app/src/main/java/com/v2ray/ang/AppConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ object AppConfig {
189189
val DNS_YANDEX_ADDRESSES = arrayListOf("77.88.8.8", "77.88.8.1", "2a02:6b8::feed:0ff", "2a02:6b8:0:1::feed:0ff")
190190

191191
//minimum list https://serverfault.com/a/304791
192-
val BYPASS_PRIVATE_IP_LIST = arrayListOf(
192+
val ROUTED_IP_LIST = arrayListOf(
193193
"0.0.0.0/5",
194194
"8.0.0.0/7",
195195
"11.0.0.0/8",

V2rayNG/app/src/main/java/com/v2ray/ang/service/V2RayVpnService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class V2RayVpnService : VpnService(), ServiceControl {
167167
//builder.addDnsServer(PRIVATE_VLAN4_ROUTER)
168168
val bypassLan = SettingsManager.routingRulesetsBypassLan()
169169
if (bypassLan) {
170-
AppConfig.BYPASS_PRIVATE_IP_LIST.forEach {
170+
AppConfig.ROUTED_IP_LIST.forEach {
171171
val addr = it.split('/')
172172
builder.addRoute(addr[0], addr[1].toInt())
173173
}
@@ -179,6 +179,7 @@ class V2RayVpnService : VpnService(), ServiceControl {
179179
builder.addAddress(PRIVATE_VLAN6_CLIENT, 126)
180180
if (bypassLan) {
181181
builder.addRoute("2000::", 3) //currently only 1/8 of total ipV6 is in use
182+
builder.addRoute("fc00::", 18) //Xray-core default FakeIPv6 Pool
182183
} else {
183184
builder.addRoute("::", 0)
184185
}

0 commit comments

Comments
 (0)