我正在制作一个阻止某些网站和应用程序的应用程序,但问题出在某些设备制造商如Motorola和HTC(Android OS牛轧糖和oreo)的应用程序在VPN连接但互联网工作正常后没有下载和更新。监视网络流量。请帮助我停留在这个阶段。
我尝试了Google上提到的所有方法
以下是本地VPN代码的片段
private void connect() {
int i;
isRunning=true;
Builder builder = new Builder();
StringBuilder stringBuilder = new StringBuilder("10.0.0.");
if (lastInt == 254) {
i = 0;
lastInt = 0;
} else {
i = lastInt;
lastInt = i + 1;
}
this.localAddress = stringBuilder.append(i).toString();
try {
if (this.parcelFileDescriptor != null) {
this.parcelFileDescriptor.close();
}
} catch (Exception e) {
}
try {
builder.addAddress(this.localAddress, 24);
builder.addDnsServer(dns1);
builder.addDnsServer(dns2);
this.parcelFileDescriptor = builder.setSession(getString(R.string.app_name)).setConfigureIntent(this.pendingIntent).establish();
Intent intent = new Intent("STARTEDDNSCHANGER");
intent.setAction(getPackageName() + ".STARTED_DNS_CHANGER");
sendBroadcast(intent);
} catch (Throwable e2) {
throw new IllegalArgumentException(e2);
}
}
最佳答案
Play通过HTTPS下载应用程序。如果您收到错误495,则表明VPN正在干扰HTTPS / TLS握手,因此Play不会下载该应用。可能您不正确支持密码算法协商。
关于android - 连接VPN后没有下载应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48139311/