外网访问还在研究怎么写;内网(filegator)在验签情况下已经可以正常访问了

This commit is contained in:
free will
2021-08-06 17:08:57 +08:00
parent 69dedb0756
commit 3b44af3153
2 changed files with 718 additions and 708 deletions
File diff suppressed because it is too large Load Diff
@@ -65,6 +65,9 @@ public class MINVpnService extends VpnService implements Handler.Callback{
// 通信intent
private PendingIntent mConfigureIntent;
// vpn 外网连接 => 支持访问国外网站
// private MINVpnExternalConnection minVpnExternalConnection=null;
@Override
public void onCreate() {
// 使用handler显示消息
@@ -152,12 +155,21 @@ public class MINVpnService extends VpnService implements Handler.Callback{
final String proxyHost = "";
final int proxyPort = 0;
// 默认开启内网服务器的连接
minVpnConnection = new MINVpnInnerConnection(
this, mNextConnectionId.getAndIncrement(), server, port, secret,
proxyHost, proxyPort, allow, packages, GlobalSetting.isSM4);
// 对vpn connection进行各种监听设置,并启动执行其run函数
startConnection(minVpnConnection);
// 根据全局变量,判断 是否开启外网服务器的连接
if(GlobalSetting.openFirewall){
// final byte[] secretToExtra = SM4HelperForConnection.getRandomSeed(); // 获取随机16位长度密钥,用于对称加密
// minVpnExternalConnection = new MINVpnExternalConnection(
// this,mNextConnectionId.getAndIncrement(),
// MINVpnSettingAPI.INSTANCE.getOneExtranetVpnServerInfo(),secretToExtra,
// proxyHost,proxyPort,allow,packages,GlobalSetting.isSM4);
}
}
/**