Skip to content

Conversation

@zhengchun
Copy link
Contributor

If you add DNS server to the VPN, a UDPOutput and UDPInput will not working. #4

private void setupVPN()
{
	if (vpnInterface == null)
	{
		Builder builder = new Builder();
		builder.addAddress(VPN_ADDRESS, 32);
		builder.addRoute(VPN_ROUTE, 0);
		builder.addDnsServer("8.8.8.8");
		vpnInterface = builder.setSession(getString(R.string.app_name)).setConfigureIntent(pendingIntent).establish();
	}
}

just call vpnService.protect() method before a socket connection to remote server.

@hexene
Copy link
Owner

hexene commented May 5, 2018

Merged (8e37ac3), thanks!

@hexene hexene closed this May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants