Skip to content

Commit

Permalink
Fix IPv6 Route.
Browse files Browse the repository at this point in the history
  • Loading branch information
so898 committed May 5, 2017
1 parent 5369e14 commit b46a9fe
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,9 @@ private ParcelFileDescriptor establishVPN() throws Exception {
if (value != null && !"".equals(value) && !servers.contains(value)) {
servers.add(value);
if (value.replaceAll("\\d", "").length() == 3){//防止IPv6地址导致问题
System.out.println(value);
builder.addRoute(value, 32);
} else {
builder.addRoute(value, 128);
}
if (ProxyConfig.IS_DEBUG)
System.out.printf("%s=%s\n", name, value);
Expand Down

0 comments on commit b46a9fe

Please sign in to comment.