Skip to content

Commit 597fd8a

Browse files
committed
fixed dns relay bug.
1 parent 7a35612 commit 597fd8a

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

CHANGE.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
##1.0.3 Beta Fix2
2+
3+
+ Fixed dns relay issue.
4+
15
##1.0.3 Beta Fix
26

37
+ Fixed port change issue.

app/app.iml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
9595
<orderEntry type="sourceFolder" forTests="false" />
9696
<orderEntry type="library" exported="" name="org.xbill.dns_2.1.7" level="project" />
97-
<orderEntry type="library" exported="" name="gson-2.3.1" level="project" />
9897
<orderEntry type="library" exported="" name="core-2.0" level="project" />
98+
<orderEntry type="library" exported="" name="gson-2.3.1" level="project" />
9999
<orderEntry type="library" exported="" name="recyclerview-v7-23.0.1" level="project" />
100100
<orderEntry type="library" exported="" name="core-3.1.0" level="project" />
101101
<orderEntry type="library" exported="" name="android-2.0" level="project" />

app/src/main/java/com/proxy/shadowsocksr/SSRVPNService.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class SSRVPNService extends VpnService
4141
{
4242
private int VPN_MTU = 1500;
4343
private String PRIVATE_VLAN = "27.27.27.%s";
44+
private String PRIVATE_VLAN6 = "fdfe:dcba:9875::%s";
4445
private ParcelFileDescriptor conn;
4546

4647
private String session;
@@ -217,7 +218,7 @@ private void startRunner()
217218
}
218219
//
219220
startSSRDaemon();
220-
if (globalProfile.dnsForward)
221+
if (!globalProfile.dnsForward)
221222
{
222223
startDnsDaemon();
223224
startDnsTunnel();
@@ -356,6 +357,7 @@ private void startDnsTunnel()
356357
private void startDnsDaemon()
357358
{
358359
String pdnsd;
360+
//ipv6 config
359361
if (globalProfile.route.equals("bypass_lan_list"))
360362
{
361363
String reject = getResources().getString(R.string.reject);
@@ -384,6 +386,9 @@ private int startVpn()
384386
.addAddress(String.format(PRIVATE_VLAN, "1"), 24)
385387
.addDnsServer("8.8.8.8");
386388

389+
//builder.addAddress(String.format(PRIVATE_VLAN6, "1"), 126);
390+
//builder.addRoute("::", 0);
391+
387392
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
388393
{
389394
builder.allowFamily(OsConstants.AF_INET6);
@@ -446,6 +451,8 @@ private int startVpn()
446451
String.format(PRIVATE_VLAN, "2"),
447452
ssProfile.localPort, fd, VPN_MTU, Consts.baseDir);
448453

454+
//cmd += " --netif-ip6addr " + String.format(PRIVATE_VLAN6,"2");
455+
449456
if (globalProfile.dnsForward)
450457
{
451458
cmd += " --enable-udprelay";

0 commit comments

Comments
 (0)