Fix/ipv6 not proxy#431
Conversation
|
fix issue #430 |
There was a problem hiding this comment.
Code Review
This pull request adds IPv6 support by configuring IPv6 DNS servers and routing in XrayBaseService, updating the DNS query strategy in AbstractConfigParser, and adding IPv4/IPv6 addresses to the tun2socks configuration. It also adds LeakCanary as a debug dependency. The review feedback recommends wrapping the IPv6 DNS server registration in a try-catch block to prevent crashes from invalid user input, and centralizing the LeakCanary dependency version within the Version Catalog.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| if (settings.ipV6Enable) { | ||
| val dnsV6Servers = settings.dnsIPv6.split(",").filter { it.isNotBlank() } | ||
| dnsV6Servers.forEach { builder.addDnsServer(it.trim()) } | ||
| } |
There was a problem hiding this comment.
Adding DNS servers directly from user-configured settings without validation can cause the application to crash if an invalid IPv6 address is entered. VpnService.Builder.addDnsServer throws an IllegalArgumentException for malformed addresses. Wrapping the call in a try-catch block ensures the service remains robust and doesn't crash due to invalid user input.
if (settings.ipV6Enable) {
val dnsV6Servers = settings.dnsIPv6.split(",").filter { it.isNotBlank() }
dnsV6Servers.forEach {
try {
builder.addDnsServer(it.trim())
} catch (e: IllegalArgumentException) {
Log.e(TAG, "Invalid IPv6 DNS server: $it", e)
}
}
}| androidTestImplementation(libs.androidx.ui.test.junit4) | ||
| debugImplementation(libs.androidx.ui.tooling) | ||
| debugImplementation(libs.androidx.ui.test.manifest) | ||
| debugImplementation("com.squareup.leakcanary:leakcanary-android:2.14") |
There was a problem hiding this comment.
No description provided.